Skip to content

Commit b6faae9

Browse files
committed
Rubocop fixes
1 parent 59f4e32 commit b6faae9

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

app/models/better_together/navigation_item.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,7 @@ def self.route_name_urls
8282
pages = BetterTogether::Page.arel_table
8383

8484
# Construct the LEFT OUTER JOIN condition
85-
# rubocop:todo Layout/LineLength
8685
join_condition = navigation_items[:linkable_type].eq('BetterTogether::Page').and(navigation_items[:linkable_id].eq(pages[:id]))
87-
# rubocop:enable Layout/LineLength
8886
join = navigation_items
8987
.join(pages, Arel::Nodes::OuterJoin)
9088
.on(join_condition)

app/models/better_together/page.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,11 @@ class Page < ApplicationRecord
4949
scope :by_publication_date, -> { order(published_at: :desc) }
5050

5151
def hero_block
52-
# rubocop:todo Layout/LineLength
5352
@hero_block ||= blocks.where(type: 'BetterTogether::Content::Hero').with_attached_background_image_file.with_translations.first
54-
# rubocop:enable Layout/LineLength
5553
end
5654

5755
def content_blocks
58-
# rubocop:todo Layout/LineLength
5956
@content_blocks ||= blocks.where.not(type: 'BetterTogether::Content::Hero').with_attached_background_image_file.with_translations
60-
# rubocop:enable Layout/LineLength
6157
end
6258

6359
# Customize the data sent to Elasticsearch for indexing

app/models/concerns/better_together/primary_flag.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ def extra_permitted_attributes
1919
super + [:primary_flag]
2020
end
2121

22-
def has_primary_for(parent_id) # rubocop:todo Naming/PredicatePrefix
22+
# rubocop:todo Naming/PredicateMethod
23+
def has_primary_for(parent_id) # rubocop:todo Naming/PredicatePrefix, Naming/PredicateMethod
24+
# rubocop:enable Naming/PredicateMethod
2325
return false unless parent_id && primary_flag_scope_key
2426

2527
where(primary_flag: true, primary_flag_scope_key => parent_id).exists?

0 commit comments

Comments
 (0)