lib/aasm/state_transition.rb in aasm-2.2.0 vs lib/aasm/state_transition.rb in aasm-2.2.1

- old
+ new

@@ -5,15 +5,15 @@ def initialize(opts) @from, @to, @guard, @on_transition = opts[:from], opts[:to], opts[:guard], opts[:on_transition] @opts = opts end - def perform(obj) + def perform(obj, *args) case @guard when Symbol, String - obj.send(@guard) + obj.send(@guard, *args) when Proc - @guard.call(obj) + @guard.call(obj, *args) else true end end