Skip to content

Instantly share code, notes, and snippets.

@neaf
Created April 28, 2010 09:13
Show Gist options
  • Select an option

  • Save neaf/381909 to your computer and use it in GitHub Desktop.

Select an option

Save neaf/381909 to your computer and use it in GitHub Desktop.
before :update do
self.status_changed = true if attribute_dirty?(:status)
end
after :update do
if status_changed
monster_type.update_time_average
self.status_changed = false
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment