app/controllers/application_controller.rb
# this should return true or false not the value of current_user
this should return true or false not the value of current_user
this should return true or false not the value of current_user
def redirect_if_not_logged_in
      if !logged_in?
        flash[:error] = "You must be logged in to view the page"
        redirect '/'
      end
    end
def redirect_if_not_logged_in if ! logged_in? flash [ :error ] = "You must be logged in to view the page" redirect '/' end end
this should return true or false not the value of current_user
this should return true or false not the value of current_user