Displaying 2 results from an estimated 2 matches for "find_posts".
2006 Aug 16
5
Rails theory question, where to put a join query
...ined 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 scrubbed...
URL: http://wr...
2007 Jul 31
0
Edit not working with named routes
HELP! I''m a relatively new rails user and I''m stuck. I''m trying to
build a relatively simple blog and I decided that I liked the way
named routes look in the code. So I added
map.resources :posts
to my routes.db file. I then went through and updated my controller to
take advantage of the named routes that were generated. I also updated
all of my views and everything