mirror of
https://github.com/aasm/aasm
synced 2023-03-27 23:22:41 -04:00
![pocari](/assets/img/avatar_default.png)
* Reproduction case added * Allow keyword arguments to be passed to event before, etc. in Ruby 2.7.1 and above. * refactoring
16 lines
273 B
Ruby
16 lines
273 B
Ruby
class EventWithKeywordArguments
|
|
include AASM
|
|
|
|
aasm do
|
|
state :open, :initial => true, :column => :status
|
|
state :closed
|
|
|
|
event :close do
|
|
before :_before_close
|
|
transitions from: :open, to: :closed
|
|
end
|
|
end
|
|
|
|
def _before_close(key:)
|
|
end
|
|
end
|