Commit fe378aa7 authored by Arturo Herrero's avatar Arturo Herrero

Use find_by instead of where + first

parent be69dc1d
...@@ -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