Topic: Restricted Pages (stack level too deep) [SOLVED] i think

i have static but restricted page named Profile
this page is part of the StaticPages and it lives on app/views/static_pages/profile.html.erb

There is nothing on this page now but title

on my controller i have

class StaticPagesController < ApplicationController
  def profile
    if ! user_signed_in?
      redirect_to(root_path)
    else
      #Something else 
    end
  end
end 

What i am hopping this would do is  check if the user is logged in and if there are not then will be send to the home page

Last edited by moiseszaragoza (2012-05-30 14:43:28)

Re: Restricted Pages (stack level too deep) [SOLVED] i think

i just created a new controller and moves all the private files to that controller

then just add

before_filter :authenticate_user!