]> source.dussan.org Git - redmine.git/commitdiff
Prevents "Overwriting existing method Issue.open" warning (#11545).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 7 Aug 2012 16:13:04 +0000 (16:13 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 7 Aug 2012 16:13:04 +0000 (16:13 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10159 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/issue.rb
app/models/version.rb

index e4de32b5363952e910b1f000b2ca2eaa5c6ce6ac..8ceec87a3c752aa547c9ec1615bf8229a7af447f 100644 (file)
@@ -64,6 +64,7 @@ class Issue < ActiveRecord::Base
         lambda {|*args| { :include => :project,
                           :conditions => Issue.visible_condition(args.shift || User.current, *args) } }
 
+  class << self; undef :open; end
   scope :open, lambda {|*args|
     is_closed = args.size > 0 ? !args.first : false
     {:conditions => ["#{IssueStatus.table_name}.is_closed = ?", is_closed], :include => :status}
index cd32da91e62a90828e1fefc3b90868a14b2e2232..49b91b87fcfa4873af977c46088cf4221b9eb998 100644 (file)
@@ -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) } }