diff options
Diffstat (limited to 'app/models/document.rb')
-rw-r--r-- | app/models/document.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/document.rb b/app/models/document.rb index d4a89ffd9..1f8e72c52 100644 --- a/app/models/document.rb +++ b/app/models/document.rb @@ -30,7 +30,7 @@ class Document < ActiveRecord::Base validates_presence_of :project, :title, :category validates_length_of :title, :maximum => 60 - named_scope :visible, lambda {|*args| { :include => :project, + scope :visible, lambda {|*args| { :include => :project, :conditions => Project.allowed_to_condition(args.shift || User.current, :view_documents, *args) } } safe_attributes 'category_id', 'title', 'description' |