Skip to content

Commit

Permalink
Merge pull request #4103 from fjordllc/bug/rubocop-lint-ineffective-a…
Browse files Browse the repository at this point in the history
…ccess-modifier

Rubocop の Lint/IneffectiveAccessModifier の警告に対応
  • Loading branch information
komagata authored Feb 1, 2022
2 parents 40b23bc + 8cb869d commit 2b23201
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions app/models/notification.rb
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,17 @@ def assigned_as_checker(product, receiver)
read: false
)
end

def product_update(product, receiver)
Notification.create!(
kind: 17,
user: receiver,
sender: product.user,
link: Rails.application.routes.url_helpers.polymorphic_path(product),
message: "#{product.user.login_name}さんの提出物が更新されました",
read: false
)
end
end

def unread?
Expand All @@ -268,15 +279,4 @@ def other_duplicates(scope: [])
duplicates = scope.inject(Notification.all) { |notifications, scope_item| notifications.where(scope_item => self[scope_item]) }
duplicates.where.not(id: id)
end

def self.product_update(product, receiver)
Notification.create!(
kind: 17,
user: receiver,
sender: product.user,
link: Rails.application.routes.url_helpers.polymorphic_path(product),
message: "#{product.user.login_name}さんの提出物が更新されました",
read: false
)
end
end

0 comments on commit 2b23201

Please sign in to comment.