daily pastebin goal
53%
SHARE
TWEET

Untitled

a guest May 23rd, 2018 63 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. >> p = Planner.find :first
  2. => #<Planner id: 1, title: "My Events", user_id: 4, created_at: nil, updated_at: nil, color: "#0048a7">
  3. >> p.all_events
  4. 33
  5. ======================================
  6. => [#<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>]
  7. >> reload!
  8. Reloading...
  9. => true
  10. >> p.all_events
  11. NoMethodError: undefined method `all_events' for #<Planner:0x2ddfc3c>
  12.         from /Users/ari/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/attribute_methods.rb:256:in `method_missing'
  13.         from (irb):13
  14. >> p = Planner.find :first
  15. => #<Planner id: 1, title: "My Events", user_id: 4, created_at: nil, updated_at: nil, color: "#0048a7">
  16. >> p.all_events
  17. 32
  18. ======================================
  19. => [#<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>]
  20. >>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top