Closed dimroc closed 10 years ago
Thanks for this. I wasn't familiar with .arity
which is a handy thing to be aware of. I can see how the arity checking might be stronger, but I think checking Rails.version
is fine for the sake of simplicity for the time being.
Hi @waymondo , could we push a new version of the gem with this fix?
Sure, just pushed a new version to rubygems.
Rails >= 4.2 has changed the method arity of _compute_redirect_to_location from (options) to (*args). The validation inside then expects two parameters: request, options. This commit handles these changes.
Rails 4.2 _compute_redirect_to_location source
Instead of checking the Rails.version, we could check the method arity:
I was torn, but went with the version check because it was simpler.