Apply Layout/SpaceInLambdaLiteral rubocop rule
I had mixed feelings about this rule, since I like spaces where
possible.
However, I changed my mind when I realized writing `->(thing) { }` was
similar to defining a method, and we don't have a space before the
parenthesis when defining a method.
This commit is contained in:
@@ -123,7 +123,7 @@ class User < ApplicationRecord
|
||||
string = "%#{search_string}%"
|
||||
where("username ILIKE ? OR email ILIKE ? OR document_number ILIKE ?", string, string, string)
|
||||
end
|
||||
scope :between_ages, -> (from, to) do
|
||||
scope :between_ages, ->(from, to) do
|
||||
where(
|
||||
"date_of_birth > ? AND date_of_birth < ?",
|
||||
to.years.ago.beginning_of_year,
|
||||
|
||||
Reference in New Issue
Block a user