From: Go MAEDA Date: Thu, 1 Apr 2021 15:36:57 +0000 (+0000) Subject: Fix "DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated: commo... X-Git-Tag: 5.0.0~462 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ec989a54201564bfd88cacb2359ad1288dad0e20;p=redmine.git Fix "DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated: common/error_messages.api" (#29914, #34984). Patch by Pavel Rosický. git-svn-id: http://svn.redmine.org/redmine/trunk@20897 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 7ddf58a4c..b5644e89d 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -744,7 +744,7 @@ class ApplicationController < ActionController::Base def render_api_errors(*messages) @error_messages = messages.flatten - render :template => 'common/error_messages.api', :status => :unprocessable_entity, :layout => nil + render :template => 'common/error_messages', :format => [:api], :status => :unprocessable_entity, :layout => nil end # Overrides #_include_layout? so that #render with no arguments diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 73929c1df..dfa96cc0e 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -286,7 +286,7 @@ class RepositoriesController < ApplicationController @changeset = @repository.find_changeset_by_name(@rev) @changeset_to = @rev_to ? @repository.find_changeset_by_name(@rev_to) : nil @diff_format_revisions = @repository.diff_format_revisions(@changeset, @changeset_to) - render :diff, :formats => :html, :layout => 'base.html.erb' + render :diff, :formats => :html, :layout => 'base' end end