ruby - When using acts-as-taggable-on gem in Rails, is it possible to delete orphaned tags? -


i deleted posts in app. tags still there. if delete posts tags won't deleted. how can detect , delete tags not linked posts?

there configuration setting can add config/application.rb make sure tags deleted when no longer used:

actsastaggableon.remove_unused_tags = true

you can put in initializer under config/initializers.

source: https://github.com/mbleigh/acts-as-taggable-on#configuration


Comments

Popular posts from this blog

javascript - How to name a jQuery function to make a browser's back button work? -

python - Django-easy-pdf: xhtml2pdf reporting reportlab 2.2+ is required, but 3.0 installed -

collision detection - C++ library for mesh to mesh intersection: what is available? -