Skip to content

Instantly share code, notes, and snippets.

@linojon
Created August 23, 2009 00:13
Show Gist options
  • Save linojon/173060 to your computer and use it in GitHub Desktop.
Save linojon/173060 to your computer and use it in GitHub Desktop.
## app/controllers/application_controller.rb
helper :all
protect_from_forgery
include Authentication
## lib/authentication.rb
module Authentication
filter_parameter_logging :password, :password_confirmation
helper_method :current_user
private
def current_user
return @current_user if defined?(@current_user)
@current_user = current_user_session && current_user_session.user
end
end
##
when i move the filter_parameter_logging and helper_method into application_controller.rb its all good
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment