Read more

Preload tags with acts-as-taggable-on

Henning Koch
October 08, 2010Software engineer at makandra GmbH

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)
Illustration UI/UX Design

UI/UX Design by makandra brand

We make sure that your target audience has the best possible experience with your digital product. You get:

  • Design tailored to your audience
  • Proven processes customized to your needs
  • An expert team of experienced designers
Read more Show archive.org snapshot

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.

Posted by Henning Koch to makandra dev (2010-10-08 16:43)