diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-08-07 16:13:04 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-08-07 16:13:04 +0000 |
commit | 2e35a6800f71e9e8d0ccfc24a5cb6f5a2775b9f8 (patch) | |
tree | 224c48572028bd726ddcd2f076e89570863ce200 /app/models/version.rb | |
parent | 0a5828ee4ada0e7a3df1da73715a435b8ff31c04 (diff) | |
download | redmine-2e35a6800f71e9e8d0ccfc24a5cb6f5a2775b9f8.tar.gz redmine-2e35a6800f71e9e8d0ccfc24a5cb6f5a2775b9f8.zip |
Prevents "Overwriting existing method Issue.open" warning (#11545).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10159 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/version.rb')
-rw-r--r-- | app/models/version.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/version.rb b/app/models/version.rb index cd32da91e..49b91b87f 100644 --- a/app/models/version.rb +++ b/app/models/version.rb @@ -35,6 +35,7 @@ class Version < ActiveRecord::Base validates_inclusion_of :sharing, :in => VERSION_SHARINGS scope :named, lambda {|arg| { :conditions => ["LOWER(#{table_name}.name) = LOWER(?)", arg.to_s.strip]}} + class << self; undef :open; end scope :open, :conditions => {:status => 'open'} scope :visible, lambda {|*args| { :include => :project, :conditions => Project.allowed_to_condition(args.first || User.current, :view_issues) } } |