Homework for 7B

Review

Topics Covered: Controllers and routes.


Exercises

E1: Take some time to REST

We've learned a lot today, so let's take some to time review. Routes (found in routes.rb) are mapped to actions in controllers. Said another way, the paths defined in routes.rb show Rails which actions in your controller to use for each paritcular URL pattern. Take a look at the following four actions and suggest which routes each of them correspond to. (Use the tweet resource in today's lecture for reference data.)

More questions

Check with a TA once you're done.

E2: What does this button do?

On to the goal of creating a desperately-needed social platform for the feline community! Return to your Meowbook project folder. For each of the following components, create a comment at the top of the file that outlines the function of the file in question. What does it do? Which files rely on it?

  1. UsersController
  2. user.rb model
  3. User index.html.erb view
  4. routes.rb


Projects

And so it continues

Hopefully you've settled on an idea or two for your final project by this point. If you're still struggling to think of something, make sure you make this a priority for the rest of the day. Remember that you'll be presenting to the group tomorrow!

The presentations will be short, 3-4 minutes, so make sure your pitch only includes the important points of your idea. You can use multimedia if you want, but this shouldn't be more than a handful of slides. If you haven't yet met with a TA to discuss your idea, make sure you do so before the end of the day.

N.B. Watch the new Hunger Games trailer if you haven't yet.

P.S. It's awesome.