The :dependent option expects either :destroy, :delete_all, or :nullify

December 28, 2007 by Doug Leave a reply »

For anyone else suffering this issue in their Rails app lately since the upgrade I’ve traced it to a deprecation in “acts_as_rateable” and “acts_as_taggable” which both use the value “true” for the dependent parameter instead of one of those listed.

The simple ‘hack’ to fix this is to replace “true” with “:destroy”. You’ll find the offending lines around here:


./vendor/plugins/acts_as_taggable/lib/acts_as_taggable.rb:17: has_many :taggings, :as => :taggable, :dependent => :destroy
./vendor/plugins/acts_as_rateable/lib/acts_as_rateable.rb:12: has_many :ratings, :as => :rateable, :dependent => :destroy

Blogged with Flock

Tags: , ,

Share and Enjoy:
  • Digg
  • del.icio.us
  • Google Bookmarks
  • BlinkList
  • DZone
  • Live
  • Ma.gnolia
  • Reddit
  • Slashdot
  • SphereIt
  • StumbleUpon

Related

Advertisement

5 Responses

  1. Dan Garland says:

    Many thanks, this helped me out. I was using rails 2.0.2. Don’t forget to restart your server after changing stuff in the vendors folder.

    Dan

  2. That was a awesome blog post,I just now subscribed to your feed.

  3. Nice post,You learn new things each day.

  4. Namaste, I hope to be this big of help myself someday

Leave a Reply