Skip to content

Set redirect_to back fallback location for when no HTTP_REFERRER is set. #716

@despo

Description

@despo

Description of the issue 📄

From error log

 ActionController::RedirectBackError: No HTTP_REFERER was set in the request to this action, so redirect_to :back could not be called successfully. If this is a test, make sure to specify request.env["HTTP_REFERER"].
+
9 non-project frames
1
File "/app/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.10/lib/action_controller/metal/redirecting.rb" line 91 in _compute_redirect_to_location
2
File "/app/vendor/bundle/ruby/2.4.0/gems/turbolinks-2.5.3/lib/turbolinks/xhr_headers.rb" line 21 in _compute_redirect_to_location
3
File "/app/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.10/lib/action_controller/metal/redirecting.rb" line 75 in redirect_to
4
File "/app/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.10/lib/action_controller/metal/flash.rb" line 57 in redirect_to
5
File "/app/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.10/lib/action_controller/metal/instrumentation.rb" line 64 in block in redirect_to
6
File "/app/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.10/lib/active_support/notifications.rb" line 164 in block in instrument
7
File "/app/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.10/lib/active_support/notifications/instrumenter.rb" line 20 in instrument
8
File "/app/vendor/bundle/ruby/2.4.0/gems/activesupport-4.2.10/lib/active_support/notifications.rb" line 164 in instrument
9
File "/app/vendor/bundle/ruby/2.4.0/gems/actionpack-4.2.10/lib/action_controller/metal/instrumentation.rb" line 63 in redirect_to
10
File "/app/app/controllers/concerns/invitation_controller_concerns.rb", line 53 in reject

To do 📋

  • Claim this issue (comment below, or assign yourself if you are part of the codebar org)
  • Fork and clone the repository
  • Update the relevant files. Follow the steps to fix section in this issue.
  • Commit your changes as one commit. Use the title of this issue as your commit message
  • Submit a pull request, make sure you mention #codebar24PR2017 in the description
  • Mention this issue in the PR description by including it's number
  • Have your pull request reviewed & merged by a codebar team member

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions