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!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs