Skip to content

Commit e12f0ef

Browse files
committed
Fix rubocop complaints
1 parent 7726fff commit e12f0ef

4 files changed

Lines changed: 6 additions & 3 deletions

File tree

.rubocop.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ AllCops:
1111
Exclude:
1212
- "vendor/**/*"
1313
- "db/schema.rb"
14+
- "db/partners_schema.rb"
1415
- "db/seeds.rb"
1516
- "db/migrate/*"
1617
- "bin/*"
@@ -440,5 +441,8 @@ Rails/WhereExists:
440441
Enabled: false
441442
Rails/WhereNot:
442443
Enabled: false
444+
Rails/HasAndBelongsToMany:
445+
Enabled: false
443446
Lint/EnsureReturn: # The service objects return self in an ensure block. Not using an explicit return does not do correct behavior
444447
Enabled: false
448+

app/models/item_category.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ class ItemCategory < ApplicationRecord
1616

1717
belongs_to :organization
1818
has_many :items, -> { order(name: :asc) }, inverse_of: :item_category
19-
has_and_belongs_to_many :partner_groups
19+
has_many :partner_groups, dependent: :nullify
2020
end

app/models/partner_group.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111
class PartnerGroup < ApplicationRecord
1212
belongs_to :organization
13-
has_many :partners
13+
has_many :partners, dependent: :nullify
1414
has_and_belongs_to_many :item_categories
1515

1616
validates :organization, presence: true

app/services/partner_fetch_requestable_items_service.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
class PartnerFetchRequestableItemsService
2-
32
def initialize(partner_id:)
43
@partner_id = partner_id
54
end

0 commit comments

Comments
 (0)