Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:counter_cache => true support #51

Open
axsuul opened this issue Jan 9, 2012 · 0 comments
Open

:counter_cache => true support #51

axsuul opened this issue Jan 9, 2012 · 0 comments

Comments

@axsuul
Copy link

axsuul commented Jan 9, 2012

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.

Anyone know of a workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant