Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >> p = Planner.find :first
- => #<Planner id: 1, title: "My Events", user_id: 4, created_at: nil, updated_at: nil, color: "#0048a7">
- >> p.all_events
- 33
- ======================================
- => [#<Event id: 1, name: "Crazy Party", description: "Party like it's hot", location: "SAE", created_at: "2008-11-10 14:39:50", updated_at: "2008-11-10 14:39:50", start: "2008-11-12 03:00:00", end: "2008-11-12 07:00:00", calendar_id: 8, read_role_id: nil, write_role_id: nil>]
- >> reload!
- Reloading...
- => true
- >> p.all_events
- NoMethodError: undefined method `all_events' for #<Planner:0x2ddfc3c>
- from /Users/ari/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/attribute_methods.rb:256:in `method_missing'
- from (irb):13
- >> p = Planner.find :first
- => #<Planner id: 1, title: "My Events", user_id: 4, created_at: nil, updated_at: nil, color: "#0048a7">
- >> p.all_events
- 32
- ======================================
- => [#<Event id: 1, name: "Crazy Party", description: "Party like it's hot", location: "SAE", created_at: "2008-11-10 14:39:50", updated_at: "2008-11-10 14:39:50", start: "2008-11-12 03:00:00", end: "2008-11-12 07:00:00", calendar_id: 8, read_role_id: nil, write_role_id: nil>]
- >>
Add Comment
Please, Sign In to add comment