sudara / alonetone

A free, open source, non-commercial home for musicians and their music
https://alonetone.com
MIT License
349 stars 89 forks source link

Use find_by_login_method to configure Authlogic #1097

Closed Manfred closed 3 years ago

Manfred commented 3 years ago

Rails said:

DEPRECATION WARNING: find_by_login_method is deprecated in favor of record_selection_method, to avoid confusion with ActiveRecord's "Dynamic Finders". (https://guides.rubyonrails.org/v6.0/active_record_querying.html#dynamic-finders) For example, rubocop-rails is confused by the deprecated method. (https://github.com/rubocop-hq/rubocop-rails/blob/master/lib/rubocop/cop/rails/dynamic_find_by.rb) (called from <class:UserSession> at /Users/manfred/Code/alonetone/app/models/user_session.rb:2)

I tested this locally by logging in with login and email. I also made sure you can't login with a black username and valid password.

sudara commented 3 years ago

Also super useful, didn't know about record_selection_method. Related: #1094 made me even more motivated to hand roll and own auth².