MorningPeak/app/assets/javascripts/commentable.coffee
Arthur Poulet b14a5e1b18 commentable are now responsive
- add comment_controller/layout
- add js to load the comments
2015-08-02 15:55:42 +02:00

9 lines
312 B
CoffeeScript

commentableLoadComments = (base_url) ->
$.get(base_url + "/comments/about").done (e) ->
$("#comments").html(e)
$(document).ready ->
commentableLoadComments(window.location.href)
$(document).on "ajax:success", "#new_comment", (e, data, status, xhr) ->
commentableLoadComments(window.location.href)