Merge pull request #1854 from MatheusRich/find-by-over-where-first
Prefer find_by! over where + first!
This commit is contained in:
@@ -35,7 +35,7 @@ class Account < ApplicationRecord
|
||||
end
|
||||
|
||||
def system_user
|
||||
users.where(role: :system).first!
|
||||
users.find_by!(role: :system)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Reference in New Issue
Block a user