From f77d4dc4f71b15af58ee6e5b5d63c436482e7b19 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 26 Jun 2019 14:50:35 +0200 Subject: [PATCH] Avoid stating the action to render when it just matches the current action --- app/controllers/api/users_controller.rb | 4 ++-- app/controllers/site_controller.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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 -- 2.43.2