-
-
Save roy/3898145 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
module Order::FianetScore | |
extend ActiveSupport::Concern | |
included do | |
include FianetScore | |
after_save :submit_to_fianet_score_if_state_changed | |
end | |
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 | |
class Order | |
include Order::FianetScore | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment