diff options
Diffstat (limited to 'app/finders/autocomplete')
-rw-r--r-- | app/finders/autocomplete/group_finder.rb | 3 | ||||
-rw-r--r-- | app/finders/autocomplete/project_finder.rb | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/app/finders/autocomplete/group_finder.rb b/app/finders/autocomplete/group_finder.rb index dd97ac4c817..90fa48c2dc9 100644 --- a/app/finders/autocomplete/group_finder.rb +++ b/app/finders/autocomplete/group_finder.rb @@ -27,8 +27,7 @@ module Autocomplete # This removes the need for using `return render_404` and similar patterns # in controllers that use this finder. unless Ability.allowed?(current_user, :read_group, group) - raise ActiveRecord::RecordNotFound - .new("Could not find a Group with ID #{group_id}") + raise ActiveRecord::RecordNotFound, "Could not find a Group with ID #{group_id}" end group diff --git a/app/finders/autocomplete/project_finder.rb b/app/finders/autocomplete/project_finder.rb index 3a4696f4c2e..6e51ae4c70d 100644 --- a/app/finders/autocomplete/project_finder.rb +++ b/app/finders/autocomplete/project_finder.rb @@ -25,8 +25,7 @@ module Autocomplete # This removes the need for using `return render_404` and similar patterns # in controllers that use this finder. unless Ability.allowed?(current_user, :read_project, project) - raise ActiveRecord::RecordNotFound - .new("Could not find a Project with ID #{project_id}") + raise ActiveRecord::RecordNotFound, "Could not find a Project with ID #{project_id}" end project |