Refactor js followable response.
This commit is contained in:
committed by
Senén Rodero Rodríguez
parent
b60748c552
commit
0c2be6a0d4
@@ -3,3 +3,6 @@ App.Followable =
|
|||||||
initialize: ->
|
initialize: ->
|
||||||
$('.followable-content a[data-toggle]').on 'click', (event) ->
|
$('.followable-content a[data-toggle]').on 'click', (event) ->
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
|
||||||
|
update: (followable_id, button) ->
|
||||||
|
$("#" + followable_id + " .js-follow").html(button)
|
||||||
|
|||||||
@@ -1 +1,2 @@
|
|||||||
$("#<%= dom_id(@followable) %> .js-follow").html('<%= j render("followable_button", followable: @followable) %>');
|
App.Followable.update("<%= dom_id(@followable) %>",
|
||||||
|
"<%= j render('followable_button', followable: @followable) %>")
|
||||||
|
|||||||
Reference in New Issue
Block a user