search for: latest_act

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

Did you mean: last_act
2007 Sep 21
1
Temporary disabling after_update
...a model like following: class Action < ActiveRecord::Base belongs_to :inquiry def after_update #clean up all action associated with the inquiry. Action.update_all("latest = ''''", ["inquiry_id = ?", self.inquiry_id]) #find the latest action latest_action = Action.find(:first, :conditions => ["deleted <> 1 and inquiry_id = ?", self.inquiry_id], :order => "action_date DESC, id DESC") #mark ''Y'' to the latest action. latest_action.update_attribute("latest", "Y") if latest_...