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
This commit is contained in:
Toshi MARUYAMA 2012-04-26 23:51:25 +00:00
parent d0d01d4e70
commit bf4d779ea2
1 changed files with 1 additions and 1 deletions

View 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] }
}