Refactor user settings
All checks were successful
continuous-integration/drone/push Build is passing

Use resources instead of custom controllers, following the Rails way
and making things much cleaner in the process.
This commit is contained in:
Râu Cao
2023-04-03 13:19:07 +02:00
parent 6f2160b479
commit 7f77ad5528
11 changed files with 92 additions and 96 deletions

View File

@@ -6,5 +6,5 @@
class: main_nav_class(@current_section, :invitations) %>
<%= link_to "Wallet", wallet_path,
class: main_nav_class(@current_section, :wallet) %>
<%= link_to "Settings", settings_profile_path,
<%= link_to "Settings", settings_path,
class: main_nav_class(@current_section, :settings) %>

View File

@@ -1,10 +1,10 @@
<%= render SidenavLinkComponent.new(
name: "Profile", path: settings_profile_path, icon: "user",
active: current_page?(settings_profile_path)
name: "Profile", path: setting_path(:profile), icon: "user",
active: current_page?(setting_path(:profile))
) %>
<%= render SidenavLinkComponent.new(
name: "Account", path: settings_account_path, icon: "key",
active: current_page?(settings_account_path)
name: "Account", path: setting_path(:account), icon: "key",
active: current_page?(setting_path(:account))
) %>
<%= render SidenavLinkComponent.new(
name: "Security", path: "#", icon: "shield", disabled: true