Allow overwriting of events, can be very useful with inheritance
This commit is contained in:
parent
e6229e35e5
commit
32c1c962db
|
@ -48,9 +48,7 @@ module AASM
|
|||
def event(name, options={}, &block)
|
||||
# @clazz.aasm_event(name, options, &block)
|
||||
|
||||
unless @state_machine.events.has_key?(name)
|
||||
@state_machine.events[name] = AASM::Event.new(name, options, &block)
|
||||
end
|
||||
|
||||
# an addition over standard aasm so that, before firing an event, you can ask
|
||||
# may_event? and get back a boolean that tells you whether the guard method
|
||||
|
|
Loading…
Reference in New Issue