Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [jmichael@mail impress]$ script/console
- Loading development environment (Rails 2.3.11)
- ree-1.8.7-2011.03 :001 > c = Carrier.last
- => #<Carrier id: 35, name: "Zillion Wireless", ...>
- ree-1.8.7-2011.03 :002 > c.advocates
- => [#<User id: 79, email: "Paul.White@floog.flo", ...>]
- ree-1.8.7-2011.03 :003 > u = User.first
- => #<User id: 1, email: "chewmanfoo@gloog.com", ...>
- ree-1.8.7-2011.03 :004 > c.advocates << u
- => [#<User id: 79, email: "Paul.White@floog.flo", ...>, #<User id: 1, email: "chewmanfoo@gloog.com", ...>]
- ree-1.8.7-2011.03 :005 > c.advocates
- => [#<User id: 79, email: "Paul.White@flog.flo", ...>, #<User id: 1, email: "chewmanfoo@gloog.com", ...>]
- ree-1.8.7-2011.03 :006 > u = User.find(1)
- => #<User id: 1, email: "chewmanfoo@gmail.com", encrypted_password: ...>
- ree-1.8.7-2011.03 :007 > u.carriers
- NameError: uninitialized constant User::Carriers
- from /home/jmichael/.rvm/gems/ree-1.8.7-2011.03/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:131:in `const_missing'
- from /home/jmichael/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-2.3.11/lib/active_record/base.rb:1:in `compute_type'
- from /home/jmichael/.rvm/gems/ree-1.8.7-2011.03/gems/activesupport-2.3.11/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
- from /home/jmichael/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-2.3.11/lib/active_record/base.rb:2234:in `compute_type'
- from /home/jmichael/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-2.3.11/lib/active_record/reflection.rb:156:in `send'
- from /home/jmichael/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-2.3.11/lib/active_record/reflection.rb:156:in `klass'
- from /home/jmichael/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-2.3.11/lib/active_record/associations/has_many_through_association.rb:78:in `find_target'
- from /home/jmichael/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-2.3.11/lib/active_record/associations/association_collection.rb:365:in `load_target'
- from /home/jmichael/.rvm/gems/ree-1.8.7-2011.03/gems/activerecord-2.3.11/lib/active_record/associations/association_proxy.rb:140:in `inspect'
- from /home/jmichael/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/irb.rb:310:in `output_value'
- from /home/jmichael/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/irb.rb:159:in `eval_input'
- from /home/jmichael/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/irb.rb:271:in `signal_status'
- from /home/jmichael/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/irb.rb:155:in `eval_input'
- from /home/jmichael/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/irb.rb:154:in `eval_input'
- from /home/jmichael/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/irb.rb:71:in `start'
- from /home/jmichael/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/irb.rb:70:in `catch'
- from /home/jmichael/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/1.8/irb.rb:70:in `start'
- from /home/jmichael/.rvm/rubies/ree-1.8.7-2011.03/bin/irb:17
Add Comment
Please, Sign In to add comment