Created
April 23, 2010 17:53
Revisions
-
markmcdonald51 created this gist
Apr 23, 2010 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ 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