Preload tags with acts-as-taggable-on

When you do tags with acts-as-taggable-on Show archive.org snapshot and want to preload associated tags, you can do so with

TaggedModel.scoped(:include => :tag)

Note however that this will only prevent tagged_model.tags from hitting the database. Using tagged_model.tag_list does not use the preloaded association.

Henning Koch Over 13 years ago