Skip to content

Commit

Permalink
gh-227 fix first_applicable call - enable *args
Browse files Browse the repository at this point in the history
  • Loading branch information
geekq committed May 16, 2024
1 parent 3481e36 commit d53bd7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/workflow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def assign_workflow(specification_object)
process_event!(event_name, *args, **kwargs)
end

define_method "can_#{event_name}?" do
return !!current_state.events.first_applicable(event_name, self)
define_method "can_#{event_name}?".to_sym do |*args, **kwargs|
return !!current_state.events.first_applicable(event_name, self, args)
end
end
end
Expand Down

0 comments on commit d53bd7e

Please sign in to comment.