mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
maybe we should real event objects instead of name strings only (so we could ask events more questions)
This commit is contained in:
parent
f5e666ef5f
commit
696aaae097
1 changed files with 1 additions and 0 deletions
|
@ -33,6 +33,7 @@ module AASM
|
|||
end
|
||||
|
||||
# QUESTION: shouldn't events and permissible_events be the same thing?
|
||||
# QUESTION: shouldn't events return objects instead of strings?
|
||||
def events(state=current_state)
|
||||
events = @instance.class.aasm.events.values.select {|e| e.transitions_from_state?(state) }
|
||||
events.map {|e| e.name}
|
||||
|
|
Loading…
Reference in a new issue