Files
grecia/app/assets/javascripts/followable.js.coffee
Javi Martín b27855c1cf Use double quotes in CoffeeScript files
As we do in the rest of the application.

Note we cannot add a rule enforcing double quotes because CoffeeScript
Lint does not have such rule.
2019-03-06 11:41:21 +01:00

9 lines
236 B
CoffeeScript

App.Followable =
update: (followable_id, button, notice) ->
$("##{followable_id} .js-follow").html(button)
if ($("[data-alert]").length > 0)
$("[data-alert]").replaceWith(notice)
else
$("body").append(notice)