diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 654a80644..34e62f027 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -165,13 +165,6 @@ Layout/AlignParameters: - 'spec/models/user_spec.rb' - 'spec/rails_helper.rb' -# Offense count: 2 -# Cop supports --auto-correct. -Layout/BlockEndNewline: - Exclude: - - 'app/models/banner.rb' - - 'spec/features/users_auth_spec.rb' - # Offense count: 19 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. diff --git a/app/models/banner.rb b/app/models/banner.rb index c4f2295e6..2764785d1 100644 --- a/app/models/banner.rb +++ b/app/models/banner.rb @@ -12,9 +12,8 @@ class Banner < ActiveRecord::Base validates :post_started_at, presence: true validates :post_ended_at, presence: true - scope :with_active, -> {where("post_started_at <= ?", Time.current). - where("post_ended_at >= ?", Time.current) } + scope :with_active, -> { where("post_started_at <= ?", Time.current).where("post_ended_at >= ?", Time.current) } - scope :with_inactive,-> {where("post_started_at > ? or post_ended_at < ?", Time.current, Time.current) } + scope :with_inactive, -> { where("post_started_at > ? or post_ended_at < ?", Time.current, Time.current) } end