From f47240483c18bad5818ac3917f4e68be3394d97a Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Thu, 14 Mar 2013 12:15:24 -0400 Subject: [PATCH] FIX: On refresh, wouldn't say "You liked this" --- app/serializers/post_serializer.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/serializers/post_serializer.rb b/app/serializers/post_serializer.rb index 97e5db7d08c..fe0c6cf71fa 100644 --- a/app/serializers/post_serializer.rb +++ b/app/serializers/post_serializer.rb @@ -155,11 +155,11 @@ class PostSerializer < ApplicationSerializer # The following only applies if you're logged in if action_summary[:can_act] && scope.current_user.present? action_summary[:can_clear_flags] = scope.is_admin? && PostActionType.flag_types.values.include?(id) + end - if post_actions.present? && post_actions.has_key?(id) - action_summary[:acted] = true - action_summary[:can_undo] = scope.can_delete?(post_actions[id]) - end + if post_actions.present? && post_actions.has_key?(id) + action_summary[:acted] = true + action_summary[:can_undo] = scope.can_delete?(post_actions[id]) end # anonymize flags