From: Jean-Philippe Lang Date: Thu, 14 Jul 2016 06:49:44 +0000 (+0000) Subject: Removes a call to alias_method_chain. X-Git-Tag: 3.4.0~811 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=541241a849944a06197c1294cbca1123a49521e3;p=redmine.git Removes a call to alias_method_chain. git-svn-id: http://svn.redmine.org/redmine/trunk@15652 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb b/lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb index 4bbba854a..2bddd64b7 100644 --- a/lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb +++ b/lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb @@ -20,7 +20,6 @@ module Redmine attr_protected :watcher_ids, :watcher_user_ids end send :include, Redmine::Acts::Watchable::InstanceMethods - alias_method_chain :watcher_user_ids=, :uniq_ids end end @@ -59,11 +58,11 @@ module Redmine end # Overrides watcher_user_ids= to make user_ids uniq - def watcher_user_ids_with_uniq_ids=(user_ids) + def watcher_user_ids=(user_ids) if user_ids.is_a?(Array) user_ids = user_ids.uniq end - send :watcher_user_ids_without_uniq_ids=, user_ids + super user_ids end # Returns true if object is watched by +user+