]> source.dussan.org Git - redmine.git/commitdiff
cleanup syntax of Relation#all at WikiController#export
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 11 Jan 2014 06:03:38 +0000 (06:03 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 11 Jan 2014 06:03:38 +0000 (06:03 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@12620 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/wiki_controller.rb

index 22f075f60c8bda04a1a21307bb058d49939ece90..c68f15afde2fa1ae71b069c49d46510214f9effe 100644 (file)
@@ -277,7 +277,10 @@ class WikiController < ApplicationController
 
   # Export wiki to a single pdf or html file
   def export
-    @pages = @wiki.pages.all(:order => 'title', :include => [:content, {:attachments => :author}])
+    @pages = @wiki.pages.
+                      order('title').
+                      includes([:content, {:attachments => :author}]).
+                      all
     respond_to do |format|
       format.html {
         export = render_to_string :action => 'export_multiple', :layout => false