Jon11
(Jon)
1
In my layout have :
<%= link_to 'Log Out Now', { :action => :log_out }%>
In my application.rb i have:
def log_out
session[:login]=nil
redirect_to '/inventory'
end
for some reason it keeps redirecting to "http://localhost:3000/
inventory/log_out" instead of /inventory....any suggestions?
11175
(-- --)
2
Jon wrote:
In my layout have :
<%= link_to 'Log Out Now', { :action => :log_out }%>
In my application.rb i have:
def log_out
session[:login]=nil
redirect_to '/inventory'
end
for some reason it keeps redirecting to "http://localhost:3000/
inventory/log_out" instead of /inventory....any suggestions?
Well what is your controller name ?
any how,
you should use redirect_to :action=> 'inventory'
i think it may work for you.
11175
(-- --)
3
check out your routes setting.
Y Reinhart AP
if its a named route then simple u can call after redirect_to method or else after redirect_to method call :action