jeffpatterson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2008-Mar-21 05:32 UTC
acts_as_list error - help!
I''m having a problem with acts_as_list, and I''m stumped. I have two models: page and item. A page contains a list of items: class Page < ActiveRecord::Base has_many :items, :dependent => :destroy, :order => :position belongs_to :portfolio ... class Item < ActiveRecord::Base belongs_to :page acts_as_list :scope => :page ... When I try to destroy an item, I get this error: NoMethodError in ItemsController#destroy undefined method `updated?'' for #<Page:0x26eeedc> If I remove the :dependent => :destroy in the has_many declaration, everything works fine (the item''s page_id is nulled, but the item isn''t destroyed). Any idea what I''m doing wrong? I''ve Googled til my fingers bled, but no luck. Any help is greatly appreciated! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---