mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-31 20:19:05 +08:00
Update variables name
This commit is contained in:
parent
1bb2393655
commit
ab1477997a
2 changed files with 4 additions and 3 deletions
|
@ -5,7 +5,7 @@ module GlobalActivitiesHelper
|
|||
include ActionView::Helpers::UrlHelper
|
||||
include InputSanitizeHelper
|
||||
|
||||
def generate_activity_content(activity, no_links: false, no_sanitization: false)
|
||||
def generate_activity_content(activity, no_links: false, no_custom_links: false)
|
||||
parameters = {}
|
||||
activity.message_items.each do |key, value|
|
||||
parameters[key] =
|
||||
|
@ -18,7 +18,7 @@ module GlobalActivitiesHelper
|
|||
end
|
||||
end
|
||||
|
||||
if no_sanitization
|
||||
if no_custom_links
|
||||
I18n.t("global_activities.content.#{activity.type_of}_html", parameters.symbolize_keys)
|
||||
else
|
||||
custom_auto_link(
|
||||
|
|
|
@ -11,7 +11,7 @@ module GenerateNotificationModel
|
|||
def generate_notification_from_activity
|
||||
return if notification_recipients.none?
|
||||
|
||||
message = generate_activity_content(self, no_links: true, no_sanitization: true)
|
||||
message = generate_activity_content(self, no_links: true, no_custom_links: true)
|
||||
description = generate_notification_description_elements(subject).reverse.join(' | ')
|
||||
|
||||
notification = Notification.create(
|
||||
|
@ -54,6 +54,7 @@ module GenerateNotificationModel
|
|||
users - [owner]
|
||||
end
|
||||
|
||||
# This method returns unsanitized elements. They must be sanitized before saving to DB
|
||||
def generate_notification_description_elements(object, elements = [])
|
||||
case object
|
||||
when Project
|
||||
|
|
Loading…
Reference in a new issue