We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I discovered that setting a default to a lazy value of the wrong type silently converts it to nil instead of raising an error. For example:
nil
class Example < ActiveInteraction::Base boolean :a_boolean, default: -> { Object.new } def execute inputs end end Example.run! # => {:a_boolean=>nil}
That should be raising an InvalidDefaultError, as it would when default: Object.new.
InvalidDefaultError
default: Object.new
The text was updated successfully, but these errors were encountered:
:(
Sorry, something went wrong.
I probably introduced this regression in #271.
In particular, I think #271 and #265 conspired to create this regression.
Fix #296; don't catch InvalidDefaultError
970d9bf
Add some specs for #296
41f4909
Merge pull request #297 from orgsync/gh-296
8839c81
Raise InvalidDefaultError instead of silently converting to nil
tfausak
Successfully merging a pull request may close this issue.
I discovered that setting a default to a lazy value of the wrong type silently converts it to
nil
instead of raising an error. For example:That should be raising an
InvalidDefaultError
, as it would whendefault: Object.new
.The text was updated successfully, but these errors were encountered: