]> source.dussan.org Git - redmine.git/commitdiff
Renamed Project#public named_scope so it will not override Ruby's public method
authorEric Davis <edavis@littlestreamsoftware.com>
Wed, 21 Oct 2009 03:21:31 +0000 (03:21 +0000)
committerEric Davis <edavis@littlestreamsoftware.com>
Wed, 21 Oct 2009 03:21:31 +0000 (03:21 +0000)
  #4056

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2941 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/welcome_controller.rb
app/models/project.rb

index c14ec4dbe4bcbe94a37e2608ef3c4bbfa5dc59d5..f2daf7449d0882d6f4c7ddf71e94273b807b8603 100644 (file)
@@ -24,7 +24,7 @@ class WelcomeController < ApplicationController
   end
   
   def robots
-    @projects = Project.public.active
+    @projects = Project.all_public.active
     render :layout => false, :content_type => 'text/plain'
   end
 end
index 33ed3b7fa88d2b9a62a63cb24fe17e5fe3911983..f9030bdf2a21c7aa15ba983e3ff51825ea9c48b1 100644 (file)
@@ -75,7 +75,7 @@ class Project < ActiveRecord::Base
 
   named_scope :has_module, lambda { |mod| { :conditions => ["#{Project.table_name}.id IN (SELECT em.project_id FROM #{EnabledModule.table_name} em WHERE em.name=?)", mod.to_s] } }
   named_scope :active, { :conditions => "#{Project.table_name}.status = #{STATUS_ACTIVE}"}
-  named_scope :public, { :conditions => { :is_public => true } }
+  named_scope :all_public, { :conditions => { :is_public => true } }
   named_scope :visible, lambda { { :conditions => Project.visible_by(User.current) } }
   
   def identifier=(identifier)