Skip to content

Commit

Permalink
rails_best_practices対応、フォロー数表示
Browse files Browse the repository at this point in the history
  • Loading branch information
KOH6 committed Sep 19, 2023
1 parent 5882403 commit 39465ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/views/posts/_form.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
.card-body.container-grid
.row
.col-1
- if @user.photo.attached?
- if user.photo.attached?
= link_to user_path(current_user), data: { turbo: false }
= image_tag @user.photo, class: "rounded-circle img-fluid", style: " max-width: 150%; height: auto;"
= image_tag user.photo, class: "rounded-circle img-fluid", style: " max-width: 150%; height: auto;"
.col
= f.text_area :content, class: 'form-control', placeholder: 'いまどうしてる?', rows: 5
.d-flex.justify-content-between.mt-4
Expand Down
8 changes: 5 additions & 3 deletions app/views/users/show.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@
i.bi-calendar.mx-2
= l @user.created_at, format: :profile
| からTwitterを利用しています
.row
.row.text-dark.fw-bold
.col
| followee数
= @user.followees.size
| フォロー中
.col
| follower数
= @user.followers.size
| フォロワー
ul#pills-tab.nav.nav-pills.w-100.nav-justified.border-bottom.my-3
li.nav-item
button#pills-post-tab.fw-bold.nav-link.active[data-bs-toggle="pill" data-bs-target="#pills-post" type="button" role="tab" aria-controls="pills-post" aria-selected="true"]
Expand Down

0 comments on commit 39465ee

Please sign in to comment.