Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- ReactDOM.render(
- React.createElement(
- CommentBox,
- {
- post_id: "<%= post.id %>",
- user_name: "<%= current_user.to_s %>",
- comments: "<%= ActiveModel::ArraySerializer.new(post.comments, each_serializer: CommentSerializer).to_json %>"
- }
- ),
- document.getElementById("post-<%= post.id %>")
- );
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement