app/controllers/application_controller.rb
# checks for user in session or cookies
checks for user in session or cookies
checks for user in session or cookies
def logged_in_user
 		unless logged_in?
 			store_location
 			flash[:danger] = "Please log in:"
 			redirect_to login_url
 		end
 	end
def logged_in_user unless logged_in? store_location flash [ :danger ] = "Please log in:" redirect_to login_url end end
checks for user in session or cookies
checks for user in session or cookies