Commit c6a8926c authored by Ash McKenzie's avatar Ash McKenzie

Merge branch 'service-template-find-by' into 'master'

Use find_by instead of where + first

See merge request gitlab-org/gitlab!27618
parents 3bb09def fe378aa7
...@@ -41,7 +41,7 @@ class Admin::ServicesController < Admin::ApplicationController ...@@ -41,7 +41,7 @@ class Admin::ServicesController < Admin::ApplicationController
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
def service def service
@service ||= Service.where(id: params[:id], template: true).first @service ||= Service.find_by(id: params[:id], template: true)
end end
# rubocop: enable CodeReuse/ActiveRecord # rubocop: enable CodeReuse/ActiveRecord
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment