Remove all Layout/BlockEndNewline rubocop issues and files from rubocop_todo list

This commit is contained in:
Bertocq
2017-06-21 20:50:41 +02:00
parent 8d84ed712a
commit 391b32e165
2 changed files with 2 additions and 10 deletions

View File

@@ -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.

View File

@@ -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