Use proper route definitions in templates

This commit is contained in:
Andreas Nedbal 2022-06-26 19:46:32 +02:00 committed by Karina Kwiatek
parent 52de0cddb0
commit 4d31addd0c
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
.card .card
.list-group .list-group
= list_group_item t(".account"), edit_user_registration_path = list_group_item t(".account"), edit_user_registration_path
= list_group_item t(".profile"), edit_user_profile_path = list_group_item t(".profile"), settings_profile_path
= list_group_item t(".privacy"), edit_user_privacy_path = list_group_item t(".privacy"), edit_user_privacy_path
= list_group_item t(".security"), edit_user_security_path = list_group_item t(".security"), edit_user_security_path
= list_group_item t(".sharing"), services_path = list_group_item t(".sharing"), services_path

View File

@ -1,7 +1,7 @@
.profile__actions .profile__actions
- type ||= :nil - type ||= :nil
- if user_signed_in? && user == current_user - if user_signed_in? && user == current_user
%a.btn.btn-dark.btn-block{ href: edit_user_profile_path } Edit profile %a.btn.btn-dark.btn-block{ href: settings_profile_path } Edit profile
- elsif user_signed_in? - elsif user_signed_in?
- if current_user.following? user - if current_user.following? user
%button.btn.btn-primary.btn-block{ type: :button, name: 'user-action', data: { action: :unfollow, type: type, target: user.screen_name } } %button.btn.btn-primary.btn-block{ type: :button, name: 'user-action', data: { action: :unfollow, type: type, target: user.screen_name } }