summaryrefslogtreecommitdiffstats
path: root/app/models/version.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/version.rb')
-rw-r--r--app/models/version.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/version.rb b/app/models/version.rb
index 24be5df02..fb97fa076 100644
--- a/app/models/version.rb
+++ b/app/models/version.rb
@@ -34,9 +34,9 @@ class Version < ActiveRecord::Base
validates_inclusion_of :status, :in => VERSION_STATUSES
validates_inclusion_of :sharing, :in => VERSION_SHARINGS
- named_scope :named, lambda {|arg| { :conditions => ["LOWER(#{table_name}.name) = LOWER(?)", arg.to_s.strip]}}
- named_scope :open, :conditions => {:status => 'open'}
- named_scope :visible, lambda {|*args| { :include => :project,
+ scope :named, lambda {|arg| { :conditions => ["LOWER(#{table_name}.name) = LOWER(?)", arg.to_s.strip]}}
+ scope :open, :conditions => {:status => 'open'}
+ scope :visible, lambda {|*args| { :include => :project,
:conditions => Project.allowed_to_condition(args.first || User.current, :view_issues) } }
safe_attributes 'name',