Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ bundle exec rails c
- Loading development environment (Rails 3.1.0.rc1)
- ruby-1.9.2-p180 :001 > a = Account.new
- => #<Account id: nil, created_at: nil, updated_at: nil>
- ruby-1.9.2-p180 :002 > d = a.dossiers.build
- => #<Dossier id: nil, account_id: nil, created_at: nil, updated_at: nil>
- ruby-1.9.2-p180 :003 > a.save!
- SQL (14.7ms) INSERT INTO "accounts" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Tue, 31 May 2011 15:56:22 UTC +00:00], ["updated_at", Tue, 31 May 2011 15:56:22 UTC +00:00]]
- SQL (0.1ms) INSERT INTO "dossiers" ("account_id", "created_at", "updated_at") VALUES (?, ?, ?) [["account_id", 1], ["created_at", Tue, 31 May 2011 15:56:22 UTC +00:00], ["updated_at", Tue, 31 May 2011 15:56:22 UTC +00:00]]
- => true
- ruby-1.9.2-p180 :004 > d = Dossier.new
- ArgumentError: Unknown validator: 'InvalidValidator'
- from /home/gucki/.rvm/gems/ruby-1.9.2-p180/gems/activemodel-3.1.0.rc1/lib/active_model/validations/validates.rb:97:in `rescue in block in validates'
- from /home/gucki/.rvm/gems/ruby-1.9.2-p180/gems/activemodel-3.1.0.rc1/lib/active_model/validations/validates.rb:94:in `block in validates'
- from /home/gucki/.rvm/gems/ruby-1.9.2-p180/gems/activemodel-3.1.0.rc1/lib/active_model/validations/validates.rb:91:in `each'
- from /home/gucki/.rvm/gems/ruby-1.9.2-p180/gems/activemodel-3.1.0.rc1/lib/active_model/validations/validates.rb:91:in `validates'
- from /home/gucki/Coding/lala/app/models/dossier.rb:4:in `<class:Dossier>'
- from /home/gucki/Coding/lala/app/models/dossier.rb:1:in `<top (required)>'
- from /home/gucki/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.0.rc1/lib/active_support/dependencies.rb:452:in `load'
- from /home/gucki/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.0.rc1/lib/active_support/dependencies.rb:452:in `block in load_file'
- from /home/gucki/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.0.rc1/lib/active_support/dependencies.rb:639:in `new_constants_in'
- from /home/gucki/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.0.rc1/lib/active_support/dependencies.rb:451:in `load_file'
- from /home/gucki/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.0.rc1/lib/active_support/dependencies.rb:338:in `require_or_load'
- from /home/gucki/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.0.rc1/lib/active_support/dependencies.rb:489:in `load_missing_constant'
- from /home/gucki/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.0.rc1/lib/active_support/dependencies.rb:181:in `block in const_missing'
- from /home/gucki/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.0.rc1/lib/active_support/dependencies.rb:179:in `each'
- from /home/gucki/.rvm/gems/ruby-1.9.2-p180/gems/activesupport-3.1.0.rc1/lib/active_support/dependencies.rb:179:in `const_missing'
- from (irb):4
- from /home/gucki/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.1.0.rc1/lib/rails/commands/console.rb:44:in `start'
- from /home/gucki/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.1.0.rc1/lib/rails/commands/console.rb:8:in `start'
- from /home/gucki/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.1.0.rc1/lib/rails/commands.rb:40:in `<top (required)>'
- from script/rails:6:in `require'
- from script/rails:6:in `<main>'ruby-1.9.2-p180 :005 >
Add Comment
Please, Sign In to add comment