search for: find_author

Displaying 1 result from an estimated 1 matches for "find_author".

2006 Aug 16
5
Rails theory question, where to put a join query
...when I construct joined queries.. Perhaps some experienced insight will straighten this out for me. Say you have two tables with two models, ''authors'' and ''posts''. an author has_many posts, a post has_one author. You need methods to do the following queries: find_author(postid) find_posts(authorid) And you are doing a custom join query for both. How do you decide what model they go into? To me either can make sense, so I am uncomfortable with picking one. Could I get some comments? Thanks! -------------- next part -------------- An HTML attachment was scrubbe...