fix repeat click like button when page refreshing
This commit is contained in:
parent
306e3c01ab
commit
edd192135a
|
@ -0,0 +1,3 @@
|
||||||
|
--ignore-file=ext:log
|
||||||
|
--ignore-dir=public
|
||||||
|
--ignore-dir=tmp
|
|
@ -12,7 +12,7 @@
|
||||||
url: window.location.pathname + "/likes/#{$scope.like}/is_liked"
|
url: window.location.pathname + "/likes/#{$scope.like}/is_liked"
|
||||||
method: 'GET'
|
method: 'GET'
|
||||||
.success (res)->
|
.success (res)->
|
||||||
if res == 'true'
|
if res == true
|
||||||
$scope.is_liked = true
|
$scope.is_liked = true
|
||||||
else
|
else
|
||||||
$scope.is_liked = false
|
$scope.is_liked = false
|
||||||
|
|
Loading…
Reference in New Issue