Enable the Layout/SpaceInLambdaLiteral cop

This commit is contained in:
gregoirenovel 2018-01-15 21:53:30 +01:00
parent 05b1fd96fd
commit 9ea1106503
2 changed files with 3 additions and 2 deletions

View file

@ -197,7 +197,8 @@ Layout/SpaceBeforeSemicolon:
Enabled: true
Layout/SpaceInLambdaLiteral:
Enabled: false
Enabled: true
EnforcedStyle: require_space
Layout/SpaceInsideArrayPercentLiteral:
Enabled: false

View file

@ -10,7 +10,7 @@ class Avis < ApplicationRecord
default_scope { joins(:dossier) }
scope :with_answer, -> { where.not(answer: nil) }
scope :without_answer, -> { where(answer: nil) }
scope :for_dossier, ->(dossier_id) { where(dossier_id: dossier_id) }
scope :for_dossier, -> (dossier_id) { where(dossier_id: dossier_id) }
scope :by_latest, -> { order(updated_at: :desc) }
scope :updated_since?, -> (date) { where('avis.updated_at > ?', date) }