From bafe92968def7822a0cd01a520517ada1b85af1f Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sun, 26 Jun 2022 13:37:15 +0200 Subject: [PATCH] Adjust usages of route definitions --- app/controllers/settings/theme_controller.rb | 4 ++-- app/views/settings/theme/edit.haml | 2 +- app/views/tabs/_settings.haml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/settings/theme_controller.rb b/app/controllers/settings/theme_controller.rb index ad80dd8e..d411bb32 100644 --- a/app/controllers/settings/theme_controller.rb +++ b/app/controllers/settings/theme_controller.rb @@ -36,11 +36,11 @@ class Settings::ThemeController < ApplicationController else flash[:error] = t(".error", errors: current_user.theme.errors.messages.flatten.join(" ")) end - redirect_to edit_user_theme_path + redirect_to settings_theme_path end def destroy current_user.theme.destroy! - redirect_to edit_user_theme_path + redirect_to settings_theme_path end end diff --git a/app/views/settings/theme/edit.haml b/app/views/settings/theme/edit.haml index 7739f3ec..d536dd4d 100644 --- a/app/views/settings/theme/edit.haml +++ b/app/views/settings/theme/edit.haml @@ -6,7 +6,7 @@ - if current_user.theme .pull-right - = button_to t(".delete"), delete_user_theme_path, data: { confirm: t("voc.confirm") }, tabindex: -1, method: :delete, class: "btn btn-danger" + = button_to t(".delete"), settings_theme_path, data: { confirm: t("voc.confirm") }, tabindex: -1, method: :delete, class: "btn btn-danger" = bootstrap_form_for(current_user.theme || Theme.new, url: { action: "update" }, html: { id: "update" }, method: :patch) do |f| .card .card-body diff --git a/app/views/tabs/_settings.haml b/app/views/tabs/_settings.haml index c520f409..ec690698 100644 --- a/app/views/tabs/_settings.haml +++ b/app/views/tabs/_settings.haml @@ -7,7 +7,7 @@ = list_group_item t(".sharing"), services_path = list_group_item t(".mutes"), edit_user_mute_rules_path = list_group_item t(".blocks"), edit_user_blocks_path - = list_group_item t(".theme"), edit_user_theme_path + = list_group_item t(".theme"), settings_theme_path = list_group_item t(".data"), user_data_path = list_group_item t(".export"), user_export_path