質問

I am using 'acts_as_taggable_on' gem for tagging. Now I have added another gem 'public_activity'. Now I want to generate an activity when a user creates a new tag. How can I achieve this? Where should I write the code for creating a new activity for new tags?

Thanks in advance:)

役に立ちましたか?

解決

I achieved the above by creating an activity for a new tag in the 'around_save' callback since a new tag can be created in 'create' as well as 'update' method of the controller. I am not sure if this was the best way to achieve the above task since I am relatively new to rails but it did work for me in the end. I hope this helps someone. cheers :)

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top