diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-04-26 23:51:10 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-04-26 23:51:10 +0000 |
commit | d0d01d4e704b0d15dfd3ce2d5213ab8b5a6678fb (patch) | |
tree | 31a2f938e01ae8032d0e4c19d979f7df575d332e /app/models/board.rb | |
parent | 71649ba2f137f3a48af031193af2b7f315519299 (diff) | |
download | redmine-d0d01d4e704b0d15dfd3ce2d5213ab8b5a6678fb.tar.gz redmine-d0d01d4e704b0d15dfd3ce2d5213ab8b5a6678fb.zip |
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
Diffstat (limited to 'app/models/board.rb')
-rw-r--r-- | app/models/board.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/board.rb b/app/models/board.rb index 40fd35673..624ef4e05 100644 --- a/app/models/board.rb +++ b/app/models/board.rb @@ -28,7 +28,7 @@ class Board < ActiveRecord::Base validates_length_of :name, :maximum => 30 validates_length_of :description, :maximum => 255 - named_scope :visible, lambda {|*args| { :include => :project, + scope :visible, lambda {|*args| { :include => :project, :conditions => Project.allowed_to_condition(args.shift || User.current, :view_messages, *args) } } safe_attributes 'name', 'description', 'move_to' |