I have two models/tables A and B. I'd like to perform an Active Record query where the results include columns from both tables. I tried inner joins as they sounded like they combine columns from both tables. However trying the Active Record joins
finder method returns results from only the first table.
What Active Record queries include columns from two tables in the results? Perhaps the includes
finder method could help.
Edit: think of the two tables as ForumThreads and Posts. Each forum thread has multiple posts. I'd like the rows in the query results to contain information for each post and information for the forum thread (for example the thread title).
This question might have answered my question: Rails Joins and include columns from joins table