FIX: API should return post_action or nil, true is wrong

This commit is contained in:
Sam 2014-08-18 12:03:46 +10:00
parent e0a82d3088
commit 9ba8b29e98

View File

@ -238,7 +238,7 @@ class PostAction < ActiveRecord::Base
rescue ActiveRecord::RecordNotUnique rescue ActiveRecord::RecordNotUnique
# can happen despite being .create # can happen despite being .create
# since already bookmarked # since already bookmarked
true PostAction.where(where_attrs).first
end end
def self.remove_act(user, post, post_action_type_id) def self.remove_act(user, post, post_action_type_id)