1
0
Fork 0
mirror of https://github.com/aasm/aasm synced 2023-03-27 23:22:41 -04:00

Fix failures array in transition not being reset

This commit is contained in:
Anil Maurya 2018-09-07 12:20:58 +05:30
parent a8755d52f5
commit de1e99bdd0

View file

@ -139,6 +139,7 @@ module AASM::Core
end
transitions.each do |transition|
transition.failures.clear #https://github.com/aasm/aasm/issues/383
next if to_state and !Array(transition.to).include?(to_state)
if (options.key?(:may_fire) && transition.eql?(options[:may_fire])) ||
(!options.key?(:may_fire) && transition.allowed?(obj, *args))