回答編集履歴

2

言葉遣いの修正

2017/11/13 13:57

投稿

sol_n
sol_n

スコア27

test CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  microposts/index.html.haml
6
6
 
7
-  ーーーーーーーーー
7
+   ーーーーーーーーー
8
8
 
9
9
  |ポスト1 [いいね!]|
10
10
 
@@ -12,7 +12,7 @@
12
12
 
13
13
  |ポスト3 [いいね!]|
14
14
 
15
-  ーーーーーーーーー
15
+   ーーーーーーーーー
16
16
 
17
17
 
18
18
 
@@ -22,7 +22,7 @@
22
22
 
23
23
 
24
24
 
25
- 具体的には、下記のような感じです。
25
+ 具体的には、下記のように書けばきると思います。
26
26
 
27
27
 
28
28
 

1

誤字修正

2017/11/13 13:57

投稿

sol_n
sol_n

スコア27

test CHANGED
@@ -56,21 +56,21 @@
56
56
 
57
57
  #いいねボタン
58
58
 
59
- if current_user.likes.find_by(tweet_id: tweet.id)
59
+ if current_user.likes.find_by(micropost_id: micropost.id)
60
60
 
61
- = link_to unlike_path(tweet.id), method: :delete, remote: true do
61
+ = link_to unlike_path(micropost.id), method: :delete, remote: true do
62
62
 
63
- .btn.btn-default.glyphicon.glyphicon-heart{id: "heart-#{tweet.id}"}
63
+ .btn.btn-default.glyphicon.glyphicon-heart{id: "heart-#{micropost.id}"}
64
64
 
65
- = tweet.likes.count.to_s
65
+ = micropost.likes.count.to_s
66
66
 
67
67
  - else
68
68
 
69
- = link_to like_path(tweet.id), method: :post, remote: true do
69
+ = link_to like_path(micropost.id), method: :post, remote: true do
70
70
 
71
- .btn.btn-default.glyphicon.glyphicon-heart-empty{id: "heart-#{tweet.id}"}
71
+ .btn.btn-default.glyphicon.glyphicon-heart-empty{id: "heart-#{micropost.id}"}
72
72
 
73
- = tweet.likes.count.to_s
73
+ = micropost.likes.count.to_s
74
74
 
75
75
  ```
76
76