This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
acts_as_authentic do |config| | |
config.merge_validates_uniqueness_of_email_field_options(:message => "W naszej bazie istnieje już użytkownik zarejestrowany pod podanym przez Ciebie adresem e-mail.") | |
config.merge_validates_length_of_email_field_options(:message => "Email jest za krótki, powinien mieć minimum 6 znaków") | |
config.merge_validates_format_of_email_field_options(:message => "Email powinien mieć właściwy format") | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{beamer} | |
\usepackage{beamerthemesplit} | |
\usepackage[MeX]{polski} | |
\usepackage[utf8]{inputenc} | |
\title{Czynnik ludzki} | |
\author{dynamiczne chłopaki} | |
\date{\today} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Order < ActiveRecord::Base | |
belongs_to :user | |
has_many :items, :class_name => "OrderItem" | |
state_machine :state, :initial => :unordered do | |
event :prepare_to_order do | |
transition :unordered => :to_order | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ServerReponses = | |
initialData: | |
player: | |
name: "Yashke" | |
status: "tired" | |
points: 100 | |
awarded_prize: | |
prize: | |
name: "Cool prize" | |
price: 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server_mock.respondTo("GET /something", ServerResponses.initialData) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data = ServerResponses.initialData | |
# data.player.points = 10 | |
# oh noes, we have ServerResponses.initialData infected | |
data = _.clone(data) | |
data.player = _.clone(data.player) | |
data.player.points = 10 | |
server_mock.respondTo("GET /something", data) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ServerReponses = | |
initialData: -> | |
player: | |
name: "Yashke" | |
status: "tired" | |
points: 100 | |
awarded_prize: | |
prize: | |
name: "Cool prize" | |
price: 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data = ServerResponses.initialData | |
data = merge(data, | |
player: | |
points: 10 | |
awarded_prize: | |
prize: | |
name: "Better prize" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 200 2 | |
37 1150 2 | |
37 7800 3 | |
37 1500 4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ServerSide | |
createToken: (callback) => | |
# asynchronously get token from server and do: | |
callback(token) | |
class SomeUsecase | |
constructor: (@serverSide) -> | |
execute: (name) => | |
@serverSide.createToken((token) => @doSmthWith(token, name)) |
OlderNewer