Is there a better way to show admin link than this? I want to
implement page caching but can't due to it not having conditions.
Fragment caching seems wrong for my site since every page should be
cached except I have this toolbar div shown in the layout if the user
is logged in.

<% if logged_in? -%>
        <div id="admin">
                <ul>
                        <li><%= link_to "New article", new_article_path %></li>
                        <li><%= link_to "New project", new_project_path %></li>
                        <%= yield :admin %>
                        <li><%= link_to "Logout", logout_path %></li>
                </ul>
                <p class="flash"><%= flash[:notice] %></p>
        </div>
        <% end -%>

Any tips on a different way of doing the admin interface that don't
involve duplication like /admin/....?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to