Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

change watcher helper that can be used in page header action buttons

Behrokh Satarnejad63f7a2495bfa
diff --git a/app/helpers/watchers_helper.rb b/app/helpers/watchers_helper.rb
index 4b9aa499533..91264afaac7 100644
--- a/app/helpers/watchers_helper.rb
+++ b/app/helpers/watchers_helper.rb
@@ -58,7 +58,8 @@ def watcher_button_arguments(object, user)
watched = object.watched_by?(user)
- path = send(:"#{(watched ? 'unwatch' : 'watch')}_path", object_type: object.class.to_s.underscore.pluralize,
+ path = send(:"#{(watched ? 'unwatch' : 'watch')}_path",
+ object_type: object.class.to_s.underscore.pluralize,
object_id: object.id)
method = watched ? :delete : :post