Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong example in README #6

Closed
Dinuuu opened this issue Apr 24, 2017 · 1 comment
Closed

Wrong example in README #6

Dinuuu opened this issue Apr 24, 2017 · 1 comment
Labels

Comments

@Dinuuu
Copy link
Contributor

Dinuuu commented Apr 24, 2017

In the README file there is an example for authenticate_entity that is

# authentication_controller.rb
def authenticate_entity(params)
  user ||= User.find_by(email: params[:email])
  return nil unless user.present? && user.valid_password?(params[:password])
end

This method uses memoization when it shouldn't (in my opinion) and also returns nil always

@hdf1996 hdf1996 added the bug label Apr 24, 2017
@mishuagopian
Copy link
Contributor

#10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants