Skip to content

Commit

Permalink
Attempting to address #129
Browse files Browse the repository at this point in the history
  • Loading branch information
btbonval committed Jun 28, 2013
1 parent f73ad2a commit 8c114eb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/controllers/like_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ def set_liking(value)
# Check if the value changed.
if like.liking_changed?
node = DrupalNode.find(params[:id])
if like.liking && node.type == "note"
SubscriptionMailer.notify_note_liked(node,like.user)
if like.liking
if node.type == "note"
SubscriptionMailer.notify_note_liked(node,like.user)
end
node.cached_likes = node.cached_likes + 1
else
node.cached_likes = node.cached_likes - 1
Expand Down

0 comments on commit 8c114eb

Please sign in to comment.