Skip to content

Commit 8b291c7

Browse files
committed
Fix rubocop complaints
1 parent 7726fff commit 8b291c7

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

.rubocop.yml

Lines changed: 4 additions & 1 deletion
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,7 @@ Rails/WhereExists:
440441
Enabled: false
441442
Rails/WhereNot:
442443
Enabled: false
443-
Lint/EnsureReturn: # The service objects return self in an ensure block. Not using an explicit return does not do correct behavior
444+
Rails/HasAndBelongsToMany:
444445
Enabled: false
446+
Lint/EnsureReturn: # The service objects return self in an ensure block. Not using an explicit return does not do correct behavior
447+
EAnabled: false

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