Rails - before_filter than includes updated object
Posted
by Sam
on Stack Overflow
See other posts from Stack Overflow
or by Sam
Published on 2010-05-05T08:25:04Z
Indexed on
2010/05/05
8:28 UTC
Read the original article
Hit count: 188
ruby-on-rails
|callback
I have a before filter than calculates a percentage that needs to include the object that is being updated. Is there a one liner in rails that takes care of this?
for example and this is totaly made up:
Object.find(:all, :include => :updated_object)
Currently I'm sending the object that is getting updated to the definition that calculates the percentage and that works but its making things messy.
© Stack Overflow or respective owner