diff options
author | Imre Farkas <ifarkas@gitlab.com> | 2018-10-26 17:47:03 +0300 |
---|---|---|
committer | Imre Farkas <ifarkas@gitlab.com> | 2018-11-05 13:36:45 +0300 |
commit | 8d900ade3832b3e2812f067ace19bad7fd286d54 (patch) | |
tree | e81f35ae24282ec1c2843ed786e4b2803ac958f6 /app/finders | |
parent | ef220c4d5baaaec54d4e9f46a4a777c29e2c0363 (diff) |
Remove PersonalAccessTokensFinder#find_by method
find_by_token is overriden by TokenAuthenticatable which can be easily
missed or confused with #find_by(:token) defined by ActiveRecord. First
step for safer usage is to remove #find_by.
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/personal_access_tokens_finder.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/finders/personal_access_tokens_finder.rb b/app/finders/personal_access_tokens_finder.rb index 81fd3b7a547..bd95dcd323f 100644 --- a/app/finders/personal_access_tokens_finder.rb +++ b/app/finders/personal_access_tokens_finder.rb @@ -3,7 +3,7 @@ class PersonalAccessTokensFinder attr_accessor :params - delegate :build, :find, :find_by, :find_by_token, to: :execute + delegate :build, :find, :find_by_id, :find_by_token, to: :execute def initialize(params = {}) @params = params |