This file contains 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
When /^I create a movie Caddyshack in the Comedy genre$/ do | |
visit movies_path | |
click_link 'Add Movie' | |
fill_in 'Title', :with => 'Caddyshack' | |
select '1980', :from => 'Release Year' | |
check 'Comedy' | |
click_button 'Save' | |
end |
This file contains 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
validate :validate_colors | |
def validate_colors | |
pattern = /^[\da-f]{6}$/ | |
primary_status = primary_color =~ pattern | |
secondary_status = secondary_color =~ pattern | |
errors.add(:primary_color, @@default_error_messages[:format]) unless primary_status | |
errors.add(:secondary_color, @@default_error_messages[:format]) unless secondary_status | |
if primary_status && secondary_status | |
if Color.similar?(primary_color, secondary_color) |
This file contains 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
Error during failsafe response: deadlock; recursive locking | |
<internal:prelude>:8:in `lock' | |
<internal:prelude>:8:in `synchronize' | |
/home/szymon/.rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.0.3/lib/active_support/buffered_logger.rb:101:in `flush' | |
/home/szymon/.rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.0.3/lib/active_support/buffered_logger.rb:125:in `auto_flush' | |
/home/szymon/.rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.0.3/lib/active_support/buffered_logger.rb:66:in `add' | |
/home/szymon/.rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.0.3/lib/active_support/buffered_logger.rb:77:in `fatal' | |
/home/szymon/.rvm/gems/ruby-1.9.2-p136/gems/actionpack-3.0.3/lib/action_dispatch/middleware/show_exceptions.rb:132:in `block in log_error' | |
/home/szymon/.rvm/gems/ruby-1.9.2-p136/gems/activesupport-3.0.3/lib/active_support/deprecation/reporting.rb:16:in `silence' | |
/home/szymon/.rvm/gems/ruby-1.9.2-p136/gems/actionpack-3.0.3/lib/action_dispatch/middleware/show_exceptions.rb:128:in `log_error' |
This file contains 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
activerecord: | |
attributes: | |
user: | |
email: 'Email address' | |
password: 'Password' | |
password_confirmation: 'Confirm password' | |
name: 'Your name' | |
errors: | |
club: | |
similar_colors: 'You have to choose two different colors' |
NewerOlder