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

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

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