From: Andy Allan Date: Wed, 26 Jun 2019 12:50:35 +0000 (+0200) Subject: Avoid stating the action to render when it just matches the current action X-Git-Tag: live~2559^2 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/f77d4dc4f71b15af58ee6e5b5d63c436482e7b19 Avoid stating the action to render when it just matches the current action --- diff --git a/app/controllers/api/users_controller.rb b/app/controllers/api/users_controller.rb index 3180cabcc..d765b4904 100644 --- a/app/controllers/api/users_controller.rb +++ b/app/controllers/api/users_controller.rb @@ -13,7 +13,7 @@ module Api def show if @user.visible? - render :action => :show, :content_type => "text/xml" + render :content_type => "text/xml" else head :gone end @@ -33,7 +33,7 @@ module Api @users = User.visible.find(ids) - render :action => :index, :content_type => "text/xml" + render :content_type => "text/xml" end def gpx_files diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb index 471e9f3c5..57ac07501 100644 --- a/app/controllers/site_controller.rb +++ b/app/controllers/site_controller.rb @@ -126,7 +126,7 @@ class SiteController < ApplicationController :style_src => %w['unsafe-inline'] ) - render "id", :layout => false + render :layout => false end private