Adjust usages of route definitions

This commit is contained in:
Andreas Nedbal 2022-06-26 13:37:15 +02:00 committed by Karina Kwiatek
parent f9bb2a2271
commit bafe92968d
3 changed files with 4 additions and 4 deletions

View File

@ -36,11 +36,11 @@ class Settings::ThemeController < ApplicationController
else else
flash[:error] = t(".error", errors: current_user.theme.errors.messages.flatten.join(" ")) flash[:error] = t(".error", errors: current_user.theme.errors.messages.flatten.join(" "))
end end
redirect_to edit_user_theme_path redirect_to settings_theme_path
end end
def destroy def destroy
current_user.theme.destroy! current_user.theme.destroy!
redirect_to edit_user_theme_path redirect_to settings_theme_path
end end
end end

View File

@ -6,7 +6,7 @@
- if current_user.theme - if current_user.theme
.pull-right .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| = bootstrap_form_for(current_user.theme || Theme.new, url: { action: "update" }, html: { id: "update" }, method: :patch) do |f|
.card .card
.card-body .card-body

View File

@ -7,7 +7,7 @@
= list_group_item t(".sharing"), services_path = list_group_item t(".sharing"), services_path
= list_group_item t(".mutes"), edit_user_mute_rules_path = list_group_item t(".mutes"), edit_user_mute_rules_path
= list_group_item t(".blocks"), edit_user_blocks_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(".data"), user_data_path
= list_group_item t(".export"), user_export_path = list_group_item t(".export"), user_export_path