Add a link to the admin area if the logged-in user has the correct role

This commit is contained in:
Matt Barringer 2013-01-20 13:43:04 +01:00
parent 64b9764b07
commit 8a7efa65d7

View file

@ -19,6 +19,9 @@
= link_to "My Proposals", conference_proposal_index_path(@conference.short_title)
%ul.nav.pull-right
- if user_signed_in?
- if has_role?(current_user, "admin") || has_role?(current_user, "organizer")
%li
= link_to "Admin Area", admin_conference_index_path
%li
= link_to('Sign Out', destroy_user_session_path, :method=>'delete')
- else