model: replace Rails2 "named_scope" to Rails3 "scope"
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9537 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
+1
-1
@@ -34,7 +34,7 @@ class News < ActiveRecord::Base
|
||||
|
||||
after_create :add_author_as_watcher
|
||||
|
||||
named_scope :visible, lambda {|*args| {
|
||||
scope :visible, lambda {|*args| {
|
||||
:include => :project,
|
||||
:conditions => Project.allowed_to_condition(args.shift || User.current, :view_news, *args)
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user