Created
October 16, 2012 08:52
-
-
Save DriesS/3898127 to your computer and use it in GitHub Desktop.
Class eval
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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