Avoid 'Cannot redirect to a parameter hash' error on Rails 4.0.10