From: Anton Khorev Date: Sat, 30 Mar 2024 05:10:24 +0000 (+0300) Subject: Rename api changeset show template X-Git-Tag: live~681^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/558c8765f546d7f13c2417275ccae847247a9d95 Rename api changeset show template Make template name correspond to action name. --- diff --git a/app/controllers/api/changeset_comments_controller.rb b/app/controllers/api/changeset_comments_controller.rb index bb77e1106..756e56dcc 100644 --- a/app/controllers/api/changeset_comments_controller.rb +++ b/app/controllers/api/changeset_comments_controller.rb @@ -42,7 +42,7 @@ module Api # Return a copy of the updated changeset @changeset = changeset - render "api/changesets/changeset" + render "api/changesets/show" respond_to do |format| format.xml @@ -67,7 +67,7 @@ module Api # Return a copy of the updated changeset @changeset = comment.changeset - render "api/changesets/changeset" + render "api/changesets/show" respond_to do |format| format.xml @@ -92,7 +92,7 @@ module Api # Return a copy of the updated changeset @changeset = comment.changeset - render "api/changesets/changeset" + render "api/changesets/show" respond_to do |format| format.xml diff --git a/app/controllers/api/changesets_controller.rb b/app/controllers/api/changesets_controller.rb index 78a5b48e3..2bca8813a 100644 --- a/app/controllers/api/changesets_controller.rb +++ b/app/controllers/api/changesets_controller.rb @@ -28,7 +28,6 @@ module Api @comments = @comments.unscope(:where => :visible) if params[:show_hidden_comments].presence && can?(:restore, ChangesetComment) @comments = @comments.includes(:author) end - render "changeset" respond_to do |format| format.xml @@ -198,7 +197,7 @@ module Api check_changeset_consistency(@changeset, current_user) @changeset.update_from(new_changeset, current_user) - render "changeset" + render "show" respond_to do |format| format.xml @@ -224,7 +223,7 @@ module Api # Return a copy of the updated changeset @changeset = changeset - render "changeset" + render "show" respond_to do |format| format.xml @@ -250,7 +249,7 @@ module Api # Return a copy of the updated changeset @changeset = changeset - render "changeset" + render "show" respond_to do |format| format.xml diff --git a/app/views/api/changesets/changeset.json.jbuilder b/app/views/api/changesets/show.json.jbuilder similarity index 100% rename from app/views/api/changesets/changeset.json.jbuilder rename to app/views/api/changesets/show.json.jbuilder diff --git a/app/views/api/changesets/changeset.xml.builder b/app/views/api/changesets/show.xml.builder similarity index 100% rename from app/views/api/changesets/changeset.xml.builder rename to app/views/api/changesets/show.xml.builder