From d0d01d4e704b0d15dfd3ce2d5213ab8b5a6678fb Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 26 Apr 2012 23:51:10 +0000 Subject: model: replace Rails2 "named_scope" to Rails3 "scope" git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9537 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/wiki_page.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models/wiki_page.rb') diff --git a/app/models/wiki_page.rb b/app/models/wiki_page.rb index 6088e48ca..5ca0583c2 100644 --- a/app/models/wiki_page.rb +++ b/app/models/wiki_page.rb @@ -49,7 +49,7 @@ class WikiPage < ActiveRecord::Base before_save :handle_redirects # eager load information about last updates, without loading text - named_scope :with_updated_on, { + scope :with_updated_on, { :select => "#{WikiPage.table_name}.*, #{WikiContent.table_name}.updated_on", :joins => "LEFT JOIN #{WikiContent.table_name} ON #{WikiContent.table_name}.page_id = #{WikiPage.table_name}.id" } -- cgit v1.2.3