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:
parent
cb0002a7d2
commit
c69437bfff
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue