retrospring/app/views/tabs/_profile.haml
Georg Gadinger 66efa5d4f4 clean up routes
- replace `match` with `get`/`post`/`patch`/`delete`
- format routes.rb
- rename the `show_user_{profile,question,answer}` routes to
  `profile`, `question`, `answer` so `url_for` (used by Rails Admin)
  works fine for these things
- also add `to_param` to the `User` model so that `url_for(some_user)`
  uses the user name
2022-07-23 12:14:06 +02:00

6 lines
453 B
Text

.card
.list-group.list-group-horizontal-sm.text-center
= list_group_item 'Answers', user_path(user), badge: user.answered_count
= list_group_item 'Questions', show_user_questions_path(user.screen_name), badge: user.asked_count
= list_group_item 'Followers', show_user_followers_path(user.screen_name), badge: user.followers.count
= list_group_item 'Following', show_user_followings_path(user.screen_name), badge: user.followings.count