acts-as-taggable-on find within specific tag context

Posted by user284194 on Stack Overflow See other posts from Stack Overflow or by user284194
Published on 2010-05-24T05:51:19Z Indexed on 2010/05/24 6:01 UTC
Read the original article Hit count: 351

I have two models (entries and messages) using acts-as-taggable-on for tagging. How do I write a find condition for tagged messages from only the one model and not both? The only way I can get the tagged items to display is through the basic find:

@tags = Tag.find(:all)

But this displays tags from both the entries model and the messages model. How can I find the tags from just the messages model? I'm really new to Rails and ActiveRecord finds. I appreciate any help you can offer. Thank you for reading my question.

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about ruby