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
params hash keys #1405
Comments
Example: {
"_method"=>"put",
"authenticity_token"=> ".....",
"bookmark"=>
{
"title"=>"FreeBSD",
"url"=>"http://www.freebsd.org/"
},
:id=>"6"
} |
Makes sense. get :foo, :map => "/:id" do
"id : #{captures[:id]}, query : #{params[:foo]}"
end
# get "/1?foo=bar"
# body #=> "id : 1, query : bar" This big change will cut the compatibility. |
So, |
Sure, I think this way is not best. But I have no idea... |
Maybe I'm missing something but I think we're looking for HashWithIndifferentAccess |
Yeah... A recursive one. |
Should we use HashWithIndifferentAccess for params? |
- the `params` variable is converted into a HashWithIndifferentAccess object - fixes #1405
- the `params` variable is converted into a HashWithIndifferentAccess object - fixes padrino#1405 Conflicts: padrino-core/lib/padrino-core/application/routing.rb
If you submit form, all keys in hash are strings
however if you defined
then id will be symbol in params hash i.e. params[:id]
I propose to extend params so that no matter string or symbol key is request it returns expected value, or at least convert them to string or symbols.
The text was updated successfully, but these errors were encountered: