Hello,
I am trying to construct an ActiveRecord query to do the following:
I have Tags that have a many-to-many relationship with Ledgers. Many
Ledgers can have many Tags. I want to construct a query to get all the
associated Ledgers that have a particular Tag.
For example, I would like to get all Ledgers with the Tag "Food". My
database tables are as follows:
Table Ledgers
Table Tags
Table Ledgers_Tags
I also have a Tag Model and a Ledger Model.
How do I construct the query using ActiveRecord?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---