Created
April 23, 2010 17:53
-
-
Save markmcdonald51/376890 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 AasmAddons | |
def self.included(base_class) | |
base_class.class_eval do | |
def aasm_fire_event(*args) | |
line_items.each do |li| | |
#li.send("#{args.first.to_s}!") | |
li.update_attributes(:state => args.first.to_s) | |
end | |
state_logs.create!(:state => args.first.to_s, :user => current_user) | |
super(*args) | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment