]> source.dussan.org Git - redmine.git/commitdiff
use "do end" instead of {} at WikiController
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 7 Nov 2020 12:31:26 +0000 (12:31 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sat, 7 Nov 2020 12:31:26 +0000 (12:31 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@20290 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/wiki_controller.rb

index 2bfeb24e83633c5eefcfed0bdff2f70e0ac1c35a..782763713b08001acb43cb404b0098d93509cf4b 100644 (file)
@@ -49,9 +49,9 @@ class WikiController < ApplicationController
     load_pages_for_index
 
     respond_to do |format|
-      format.html {
+      format.html do
         @pages_by_parent_id = @pages.group_by(&:parent_id)
-      }
+      end
       format.api
     end
   end
@@ -184,17 +184,17 @@ class WikiController < ApplicationController
       call_hook(:controller_wiki_edit_after_save, { :params => params, :page => @page})
 
       respond_to do |format|
-        format.html {
+        format.html do
           anchor = @section ? "section-#{@section}" : nil
           redirect_to project_wiki_page_path(@project, @page.title, :anchor => anchor)
-        }
-        format.api {
+        end
+        format.api do
           if was_new_page
             render :action => 'show', :status => :created, :location => project_wiki_page_path(@project, @page.title)
           else
             render_api_ok
           end
-        }
+        end
       end
     else
       respond_to do |format|
@@ -206,10 +206,10 @@ class WikiController < ApplicationController
   rescue ActiveRecord::StaleObjectError, Redmine::WikiFormatting::StaleSectionError
     # Optimistic locking exception
     respond_to do |format|
-      format.html {
+      format.html do
         flash.now[:error] = l(:notice_locking_conflict)
         render :action => 'edit'
-      }
+      end
       format.api { render_api_head :conflict }
     end
   end
@@ -287,10 +287,10 @@ class WikiController < ApplicationController
     end
     @page.destroy
     respond_to do |format|
-      format.html {
+      format.html do
         flash[:notice] = l(:notice_successful_delete)
         redirect_to project_wiki_index_path(@project)
-      }
+      end
       format.api { render_api_ok }
     end
   end
@@ -312,13 +312,13 @@ class WikiController < ApplicationController
                       includes([:content, {:attachments => :author}]).
                       to_a
     respond_to do |format|
-      format.html {
+      format.html do
         export = render_to_string :action => 'export_multiple', :layout => false
         send_data(export, :type => 'text/html', :filename => "wiki.html")
-      }
-      format.pdf {
+      end
+      format.pdf do
         send_file_headers! :type => 'application/pdf', :filename => "#{@project.identifier}.pdf"
-      }
+      end
     end
   end