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

taggings_count not updating in act as taggable #929

Open
vishaltps opened this issue Nov 22, 2018 · 1 comment
Open

taggings_count not updating in act as taggable #929

vishaltps opened this issue Nov 22, 2018 · 1 comment

Comments

@vishaltps
Copy link

I used gem act_as_taggable in my project. Below is my model

post.rb

acts_as_taggable_on :moods
has_many :taggings, as: :taggable, dependent: :destroy

It is working fine, but the only issue is taggings_count field of tags count isn't updating.

Am I missing something to add any extra config? Because as per my understanding it should update automatically

@vishaltps
Copy link
Author

I resolved this issue, We don't need to write has many association of taggings. I removed below association and everything is working fine now.

has_many :taggings, as: :taggable, dependent: :destroy

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