Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <% @posts.each do |post| %>
- ....
- ....
- ....
- <%= react_component(
- "CommentBox",
- post_id: post.id,
- user_name: current_user.to_s,
- comments: ActiveModel::ArraySerializer.new(
- post.comments.includes(:user),
- each_serializer: CommentSerializer
- ).to_json
- ) %>
- <% end %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement