I'm trying to enable counter cache for a citier model's association like so
class Comment
belongs_to :media, :counter_cache => true
end
and also adding a comments_count column for the root model Media. However, there doesn't seem to be support for the counter cache since I'm getting thrown this error
ActiveRecord::StatementInvalid: PGError: ERROR: cannot update a view
HINT: You need an unconditional ON UPDATE DO INSTEAD rule.
I'm trying to enable counter cache for a citier model's association like so
and also adding a
comments_count
column for the root modelMedia
. However, there doesn't seem to be support for the counter cache since I'm getting thrown this errorAnyone know of a workaround?