I have a before_save
that 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 totally 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 it's making things messy.