diff options
Diffstat (limited to 'app/finders/concerns/finder_methods.rb')
-rw-r--r-- | app/finders/concerns/finder_methods.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/finders/concerns/finder_methods.rb b/app/finders/concerns/finder_methods.rb index 2e905fa5750..ce0ec214b8a 100644 --- a/app/finders/concerns/finder_methods.rb +++ b/app/finders/concerns/finder_methods.rb @@ -1,11 +1,15 @@ module FinderMethods + # rubocop: disable CodeReuse/ActiveRecord def find_by!(*args) raise_not_found_unless_authorized execute.find_by!(*args) end + # rubocop: enable CodeReuse/ActiveRecord + # rubocop: disable CodeReuse/ActiveRecord def find_by(*args) if_authorized execute.find_by(*args) end + # rubocop: enable CodeReuse/ActiveRecord def find(*args) raise_not_found_unless_authorized model.find(*args) |