Redirect back to where I came from when loggin in via the menu form
This commit is contained in:
parent
58a7182e2d
commit
0049f82182
|
@ -281,6 +281,9 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
|
||||
def redirect_back_or_default(default)
|
||||
p params[:back_url].to_s
|
||||
p URI.escape(CGI.unescape(params[:back_url].to_s))
|
||||
|
||||
back_url = URI.escape(CGI.unescape(params[:back_url].to_s))
|
||||
if !back_url.blank?
|
||||
begin
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<div id="nav-login-content">
|
||||
<% form_tag({:controller => "account", :action=> "login"}) do %>
|
||||
<%= hidden_field_tag('back_url', CGI.escape(request.url)) %>
|
||||
<table>
|
||||
<tr>
|
||||
<td><label for="username-pulldown"><%= l(:field_login) %></label></td>
|
||||
|
|
Loading…
Reference in New Issue