-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
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
Error with inputs method after 4.0 release #493
Comments
A similar problem. Temporarily used |
@VetLee Glad I'm not the only one! I'm converting the inputs to hash just as you are for the time being. |
@AaronLasseigne Ah, I could have been clearer: the issue pertains to the I'm also happy to create a repo with a clean rails environment where it can be replicated if that's preferable! |
Just chiming in because I noticed (I think) this same issue today after upgrading to the latest version. It looks like the type returned from the def normalize_inputs!(inputs)
return inputs if inputs.is_a?(Hash)
parameters = 'ActionController::Parameters'
klass = parameters.safe_constantize
return inputs.to_unsafe_h if klass && inputs.is_a?(klass)
raise ArgumentError, "inputs must be a hash or #{parameters}"
end This is a problem when using the |
Hey there! Thanks for your awesome work on this project, I absolutely love using this library.
I noticed my tests started breaking today (I've been using the v4.0.0 tag for a number of months) and I'm getting the following error:
I wasn't sure if it was just my app or configuration, so I created a fresh new rails environment using ruby 2.6 and Rails 6. I created your
Add
andAddAndDouble
classes from the readme examples, and got the same error for the linecompose(Add, inputs) * 2
when callingAddAndDouble.run!(x: 1, y: 1)
I also noticed the release notes mention a change to inputs and wasn't sure if that is related to this.
Do I need to be handling inputs differently for 4.0, or is this a bug?
The text was updated successfully, but these errors were encountered: