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.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---