diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-04-26 23:51:25 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-04-26 23:51:25 +0000 |
commit | bf4d779ea209084affcb1b800343051bd38422ad (patch) | |
tree | f93435519cd75997134e7053a68c412d90524fad /lib/plugins | |
parent | d0d01d4e704b0d15dfd3ce2d5213ab8b5a6678fb (diff) | |
download | redmine-bf4d779ea209084affcb1b800343051bd38422ad.tar.gz redmine-bf4d779ea209084affcb1b800343051bd38422ad.zip |
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
Diffstat (limited to 'lib/plugins')
-rw-r--r-- | lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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] } } |