You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For model Foo, inserting at say position utilizing strong parameters yields
> Foo.insert_at(foo_params[:position])
> ArgumentError: comparison of Fixnum with String failed
Parameters for my case are passed as String. To get it to insert, I must convert the parameter position to type Integer. I accomplished this in the foo_params method.
What's the feasibility of having the (String|Integer) => Integer conversion included in the insert_at method (and any other applicable method)?
The text was updated successfully, but these errors were encountered:
It could be feasible but not something any of us have time to work on. If you can provide a PR we can look at it from there. I'll close this for now though. I think it's reasonable to expect the position to be provided as an integer and for your code to be doing the conversion first.
For model
Foo
, inserting at sayposition
utilizing strong parameters yieldsParameters for my case are passed as String. To get it to insert, I must convert the parameter
position
to type Integer. I accomplished this in thefoo_params
method.What's the feasibility of having the (String|Integer) => Integer conversion included in the insert_at method (and any other applicable method)?
The text was updated successfully, but these errors were encountered: