Skip to content

Instantly share code, notes, and snippets.

@austinrfnd
Created August 13, 2013 03:27
Show Gist options
  • Save austinrfnd/6217640 to your computer and use it in GitHub Desktop.
Save austinrfnd/6217640 to your computer and use it in GitHub Desktop.
Find all tags given a context of a model from Acts as Taggble!
ActsAsTaggableOn::Tag.includes(:taggings).where("taggings.taggable_type = 'Question'").select("DISTINCS tags.*")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment