app/controllers/application_controller.rb
# BUILD HELPER METHOD FOR REDIRECTING IF NOT LOGGED IN!!
BUILD HELPER METHOD FOR REDIRECTING IF NOT LOGGED IN
BUILD HELPER METHOD FOR REDIRECTING IF NOT LOGGED IN
def redirect_if_not_logged_in
      if !logged_in?
        flash[:errors] = "You must be logged in to view the page you tried to view."
        redirect '/'
      end
    end
def redirect_if_not_logged_in if ! logged_in? flash [ :errors ] = "You must be logged in to view the page you tried to view." redirect '/' end end
BUILD HELPER METHOD FOR REDIRECTING IF NOT LOGGED IN!
BUILD HELPER METHOD FOR REDIRECTING IF NOT LOGGED IN!