launchscout / nku

NKU Class Spring
5 stars 14 forks source link

Tutorial: 5.7 Showing Posts #2

Closed seipje closed 10 years ago

seipje commented 10 years ago

I figured I would post this in hopes of preventing other people from wanting to strangle their computers (because that's possible, didn't you know?).

As I was going through the tutorial, I reached section 5.7, where I quickly became confused. Here's where I mean: 5 7 showing posts

I googled for a few minutes and came up with a more concise version of the section, here: http://edgeguides.rubyonrails.org/getting_started.html#showing-posts.

What was holding me up was that I didn't know what "post GET /posts/:id(.:format) posts#show" was, if I was supposed to put it somewhere, or if so, where I was supposed to put it. But it turns out, it's just what you're supposed to see when you run the command "rake routes." So if you see that, then everything's working right.

jaimerump commented 10 years ago

That just means that when you send a GET request (access the page with your browser) to /posts/:post_id (with optional format specifier it looks like), that means run the PostsController's show action with the post that the id points to. That's pretty standard syntax for a route in an MVC framework. I use Zend Framework for PHP and it looks almost identical.

seipje commented 10 years ago

Thank you for the clarification on that :) I mean, while I was doing it, I knew basically what I was looking at, but the tutorial was very unclear on what I was supposed to be doing with that particular line. It doesn't tell you in the tutorial at all, so it was confusing. I got it figured out eventually though haha

mitchlloyd commented 10 years ago

Sounds like we've got it resolved, and other students will be able to search the issues for this problem. Nice work!