title: How to get all the Posts from a User
body: <p>I have a User and Post scaffolded in my rails application.  I wanted to get all of the posts associated with a user.  For example, I want to be able to do something like this:</p>
  
  <blockquote>
    <p>localhost:3000/users/1/posts</p>
  </blockquote>
  
  <p>And it should give me all of the posts with the user_id = 1.  I know how to get all the posts via the rails console for a specific user. I was just wondering how i can accomplish something like the example above. Would I have to add another method in the users controller? </p>