Closed TruesSpeak closed 1 year ago
It seems to be working for me on 5.2.0.
class I < ActiveInteraction::Base
string :s
def execute
s
end
end
I.run.errors.full_messages
=> ["S is required"]
class I < ActiveInteraction::Base
string :s
validates :s, length: { minimum: 2 }
def execute
s
end
end
I.run(s: 'a').errors.full_messages
=> ["S is too short (minimum is 2 characters)"]
Can you provide an example interaction where it fails?
Hello @AaronLasseigne ! Recently, the rails project at my work updated the gem and encountered strange behavior. The full_messages method outputs an empty array for errors. At the same time, messages displays correct information for errors. I patched the ActiveInteraction class with my hands::Errors, added And everything started working, but what surprised me was that in the tests in the gem repository, the method works without problems so. I attach screenshots We up version of gem from (3.8.3) to (5.2.0) because up ruby and rails versions to 3.2.1 and 7.0.4.2 Maybe you have any ideas how to fix it?