Skip to content

Instantly share code, notes, and snippets.

@DriesS
Created October 16, 2012 08:52
Show Gist options
  • Save DriesS/3898127 to your computer and use it in GitHub Desktop.
Save DriesS/3898127 to your computer and use it in GitHub Desktop.
Class eval
Order.class_eval do
include FianetScore
after_save :submit_to_fianet_score_if_state_changed
def submit_to_fianet_score_if_state_changed
if self.fianet_eval && self.fianet_eval.changed? && self.fianet_eval == 100
self.submit_to_fianet_score
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment