class ApplicationController < ActionController::Base
	# Prevent CSRF attacks by raising an exception.
	# For APIs, you may want to use :null_session instead.
	protect_from_forgery with: :exception

	helper_method :current_user

	def current_user
		return nil if session[:user_id].nil?
		User.find(session[:user_id])
	end

	def check_user_logged_in
		if session[:user_id].nil?
			redirect_to ideas_path
		end
	end
end


class ApplicationController < ActionController::Base
	# Prevent CSRF attacks by raising an exception.
	# For APIs, you may want to use :null_session instead.
	protect_from_forgery with: :exception

	helper_method :current_user

	def current_user
		return nil if session[:user_id].nil?
		User.find(session[:user_id])
	end

	def ensure_that_signed_in
                redirect_to ideas_path, notice:'you should be signed in' if current_user.nil?
	end
end


Rename and refactor method check_user_logged_in
Rename and refactor method check_user_logged_in

Fix according to pull request feedback