summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/models/issue.rb1
-rw-r--r--app/models/version.rb1
2 files changed, 2 insertions, 0 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index e4de32b53..8ceec87a3 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -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}
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) } }