Remove all Layout/BlockEndNewline rubocop issues and files from rubocop_todo list
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user