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

Adds documentation for #valid_password? in README #725

Merged
merged 1 commit into from
Nov 10, 2015

Conversation

jerefrer
Copy link
Contributor

No description provided.

@jerefrer
Copy link
Contributor Author

Well I did not actually test the method ... Apparently it's not accessible:

NoMethodError: undefined method `valid_password?' for #<User:0x00000009ea27d0>

Why is that ?

@arnvald
Copy link
Collaborator

arnvald commented Sep 30, 2015

@jerefrer are you sure you've called authenticates_with_sorcery! in User class?

@jerefrer
Copy link
Contributor Author

@arnvald Yes definitely

@arnvald
Copy link
Collaborator

arnvald commented Sep 30, 2015

There must be something wrong, either in your project, or maybe it's a problem specific to some configuration (new/old version of Rails etc). I've just run it and it works:

λ ARV sorcery-example-app → λ git rails_4* → bundle exec rails c
Loading development environment (Rails 4.0.2)
irb(main):001:0> User.new.valid_password?('a')
=> false

@jerefrer
Copy link
Contributor Author

This is weird indeed.
Activated submodules are :remember_me and :activity_logging
I tried removing every other gem in the project and the bug is still there, but in case you'd want to take a look here are my Gemfile and Gemfile.lock: https://gist.github.com/jerefrer/69700ea146fcd2590969

@jerefrer
Copy link
Contributor Author

@arnvald I updated my Gemfile to fetch sorcery from github, and now the issue is gone, valid_password? is working as expected. Before updating active_for_authentication? was also not working (not called when authenticating).

Maybe it would be time to push a new version to rubygems ? (and merge my PR ;)

arnvald added a commit that referenced this pull request Nov 10, 2015
Adds documentation for #valid_password? in README
@arnvald arnvald merged commit c407b19 into NoamB:master Nov 10, 2015
@jerefrer
Copy link
Contributor Author

Thanks 👍

Have a great day !

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

Successfully merging this pull request may close these issues.

2 participants