質問編集履歴

1

追記

2017/07/05 05:22

投稿

ssk
ssk

スコア332

test CHANGED
File without changes
test CHANGED
@@ -27,6 +27,22 @@
27
27
 
28
28
 
29
29
  ###該当のソースコード
30
+
31
+ ```ruby
32
+
33
+ #microposts_controller.rb
34
+
35
+ def index
36
+
37
+ @micropost = current_user.microposts.build if logged_in?
38
+
39
+ @microposts = Micropost.all
40
+
41
+ @likes = Like.where(micropost_id: params[:micropost_id])
42
+
43
+ end
44
+
45
+ ```
30
46
 
31
47
  ```ruby
32
48