Apply rubocop Rails/FindBy rule everywhere
We didn't detect these cases because by default the rule only searches for offenses in `app/models/`.
This commit is contained in:
@@ -98,7 +98,7 @@ class ApplicationController < ActionController::Base
|
||||
|
||||
def track_email_campaign
|
||||
if params[:track_id]
|
||||
campaign = Campaign.where(track_id: params[:track_id]).first
|
||||
campaign = Campaign.find_by(track_id: params[:track_id])
|
||||
ahoy.track campaign.name if campaign.present?
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user