]> git.openstreetmap.org Git - rails.git/blob - app/helpers/notifications_helper.rb
Merge remote-tracking branch 'upstream/pull/7283'
[rails.git] / app / helpers / notifications_helper.rb
1 # frozen_string_literal: true
2
3 module NotificationsHelper
4   def partial_path_for_notification(notification)
5     # Turn "ChangesetCommentNotifier::Notification" into "ChangesetComment"
6     event_type_name = notification.class.name.sub("Notifier::Notification", "")
7
8     "notifications/#{event_type_name.underscore}"
9   end
10 end