MorningPeak/app/assets/javascripts/commentable.coffee
2015-08-05 02:15:36 +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)