The functions in the application.rb file are very useful, but how does one use them in the views?
For example, if I want to show a link to a user only if logged in, this doesn't work:
<% if current_user -%>
<a href="http://www.aidanf.net/admin">Admin Functions</a>
<% end -%>
because current_user is not available to the view.
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.