Topic: Need a little help with sessions
I'm making a app that need to check the session[:valid] is true so to render :action2 if not redirect_to /controller/action1. This is what i have done so far:
@session ||= session[:valid] = nil
@session ? render(:action2) : redirect_to(:action1)
match '/controller/action1' => 'controller#action1', :as => 'action1'
match '/controller/action2' => 'controller#action2', :as => 'action2'
but the issue is that when going to /controller/action2 it renders action2 and not redirects to action1. What am i doing wrong.