Closed mauro-oto closed 6 years ago
Thanks!
This was released as part of Cuba 3.9.1.
This introduced a breaking change. With version 3.9.0 it was possible to use symbols when capturing params.
get param(:foo) do
# ...
end
With this change it is not possible anymore. This is due to how []
helper in rack works (it calls key.to_s
),
Check https://github.com/rack/rack/pull/1069/commits/7c3d700c00d13e0dead8f110a95606fd1332c5a2
As we can see, req.params[key]
is not a direct replacement of req[key]
I think it would be safer to call to_s
in order to keep compatibility and remove it in a major release. I can crete a PR if this makes sense.
@Juanmcuello Good catch! I think a PR with a to_s
will be perfect and we can release it as version 3.9.2.
Since the Rack dependency version was relaxed in the gemspec, using Rack >= 2.0 will now show a deprecation warning.
Request#[]
was deprecated in https://github.com/rack/rack/pull/1069.Please check it out, thanks!