I'm using restful_authentication and I would like to have diferent views
for logged users and not logged users. Logged users can edit and create
items, and not logged user could only list items and show its features.
In my routes file I have:
map.namespace :admin do |admin|
map.resources :items, :controller => "admin/items", :path_prefix =>
In my views I have:
<%= link_to '<b>Items</b>', items_path %>
The link_to always redirect to admin/item/index (except if I change the
order in routes.rb, if I do always redirect to item/index).
Is it possible to redirect admin/item/index when user is logged in and
redirect to item/index when user is not logged in?