Issue for mongoid

Queries is always on ObjectId type of imperssion_id, while model not restricts the type.
Thats can cause to saves in String format, hence not imperssions will be counted on counter_cache
This commit is contained in:
zonkeynir 2014-04-28 17:50:14 +03:00
parent cb0002a7d2
commit c69437bfff
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ class Impression
include Impressionist::CounterCache
Impressionist::SetupAssociation.new(self).set
field :impressionable_id
field :impressionable_id, type: BSON::ObjectId
field :impressionable_type
field :user_id
field :controller_name