From bf4d779ea209084affcb1b800343051bd38422ad Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 26 Apr 2012 23:51:25 +0000 Subject: [PATCH] replace Rails2 "named_scope" to Rails3 "scope" at lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9538 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 5420da0fe..1f8877584 100644 --- a/lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb +++ b/lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb @@ -13,7 +13,7 @@ module Redmine has_many :watchers, :as => :watchable, :dependent => :delete_all has_many :watcher_users, :through => :watchers, :source => :user, :validate => false - named_scope :watched_by, lambda { |user_id| + scope :watched_by, lambda { |user_id| { :include => :watchers, :conditions => ["#{Watcher.table_name}.user_id = ?", user_id] } } -- 2.39.5