search for: decrement_rating

Displaying 1 result from an estimated 1 matches for "decrement_rating".

2007 Jul 21
3
unable to get "has_many :after_add" to work - need help
...omeone tell me what I''m doing wrong? I''ve spent way too much time on this -------------------------------------------------------------------------------------- class Picture < ActiveRecord::Base has_many :ratings, :after_add => :increment_rating, :after_remove => :decrement_rating def increment_members(rating) self.rating += rating.amount save! end end -------------------------------------------------------------------------------------- class Rating < ActiveRecord::Base belongs_to :picture end -------------------------------------------------------------...