1
0
Fork 0
mirror of https://github.com/aasm/aasm synced 2023-03-27 23:22:41 -04:00

forgot to copy a method from my other fork

This commit is contained in:
bokmann 2010-10-05 12:16:49 -04:00
parent 7339c68c28
commit 1215d72904

View file

@ -53,7 +53,7 @@ module AASM
# may_event? and get back a boolean that tells you whether the guard method
# on the transition will let this happen.
define_method("may_#{name.to_s}?") do |*args|
aasm_test_event(name)
aasm_test_event(name, *args)
end
define_method("#{name.to_s}!") do |*args|
@ -154,6 +154,11 @@ module AASM
obj
end
def aasm_test_event(name, *args)
event = self.class.aasm_events[name]
event.may_fire?(self, *args)
end
def aasm_fire_event(name, persist, *args)
event = self.class.aasm_events[name]
begin