]> source.dussan.org Git - redmine.git/commitdiff
replace Rails2 "named_scope" to Rails3 "scope" at lib/plugins/acts_as_watchable/lib...
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 26 Apr 2012 23:51:25 +0000 (23:51 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 26 Apr 2012 23:51:25 +0000 (23:51 +0000)
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

index 5420da0fef517d82c6ce9feb9765c3ecb9d21085..1f887758436b14651dcdab8872a82289def07daf 100644 (file)
@@ -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] }
             }