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:
Javi Martín
2019-11-08 18:49:57 +01:00
parent 84bbd81d95
commit ea2aeab383
28 changed files with 48 additions and 44 deletions

View File

@@ -13,7 +13,7 @@ class Admin::HomepageController < Admin::BaseController
end
def load_recommendations
@recommendations = Setting.where(key: "feature.user.recommendations").first
@recommendations = Setting.find_by(key: "feature.user.recommendations")
end
def load_cards