I am not familiar with the authentication method you use, but as soon as you authenticate the user, you can save the logged_in flag in your session
session[:user]='logged_in'
than you can create an assistant
def logged_in? session[:user] =='logged_in' end
Now you can use this helper in your views
<% if logged_in? %> your html <% end %>
Now it is very simple, if you need something more specific, let us know
- Therefore, I just noticed that you want only registered users to be able to see the entire page.
then you should use function authentication as a filter in front of you in the controller
before_filter :authenticate
source share