Correct false assumption on the return value of the split method.

The new method redirect_back has a nil return value (line 298) if it indeed redirects back, that still causes line 286 to execute the redirect_to default causing a double-render-or-redirect-error. We explicitly only want the redirect_to default to be called when redirect_back is false, not false or nil.
pull/41/head
Felix Schäfer 13 years ago
parent f1973e710c
commit 145f8104a0
  1. 2
      app/controllers/application_controller.rb

@ -283,7 +283,7 @@ class ApplicationController < ActionController::Base
end
def redirect_back_or_default(default)
redirect_to default unless redirect_back
redirect_to default unless (redirect_back != false)
false
end

Loading…
Cancel
Save