I know that I can have a session after the user login. Also, I created a helper method called “current_user”. I don’t want to other people which are not signed in can get access to the page. Apart from making doing this, how can I do?
I can do this to not allow people the get access to the content, but I don’t want the user within login see the blank page too.
<% if current_user%>
My Content
<% end %>
Make a before_filter that checks if the current_user variable is set, and redirects the user to some other place (root, signup page, something) if it is not. Something like this: