Fix bugs

Hey Eric -

I went through your code and fixed a few problems.  Descriptions inline.

-----
As a side note, this is a GitHub pull request.  This is how I can show you code that I think you should add to your project.  It allows you to look at the code, you'll see the green code is code that's added and the red is code that's deleted.  The "Files changed" tab will show you the code.

"Commits" will show you a listing of the individual commits I'm trying to send you.  And this tab, the conversation tab you can use to communicate about the change.

If you want to suck in all this code into your project you can by pressing the green merge button.  After you press the merge button, you'll have to update your web dev environment to have the latest updates from GitHub and to do that you can run this command:

```
git pull origin master
```

Hope this helps.

Aloha,
Ken

Hi Ken,

Is it correct to say that any dynamic page (they are pages in my mind) will
always have a controller and a model? (views I understand).

Thanks. See you this afternoon. Any questions or topics you want me to
push? Items you think would be beneficial for the entire crowd?

Eric


On Tue, Oct 21, 2014 at 11:21 AM, ken mazaika <notifications@github.com>
wrote:

> In app/controllers/static_pages_controller.rb:
>
> > @@ -1,4 +1,5 @@
> >  class StaticPagesController < ApplicationController
> >  	def index
> > +		@plates = Plate.all
>
> Hey Eric -
>
> I do get notifications about GitHub updates.
>
> Here's a snippet from your routes file:
>
>                     root GET    /                              static_pages#index
>                     user GET    /users/:id(.:format)           users#show
>                   plates GET    /plates(.:format)              plates#index
>                          POST   /plates(.:format)              plates#create
>                new_plate GET    /plates/new(.:format)          plates#new
>               edit_plate GET    /plates/:id/edit(.:format)     plates#edit
>                    plate GET    /plates/:id(.:format)          plates#show
>                          PATCH  /plates/:id(.:format)          plates#update
>                          PUT    /plates/:id(.:format)          plates#update
>                          DELETE /plates/:id(.:format)          plates#destroy
>
> This means GET requests to the URL that looks like / (the root of your
> application) go to the static pages controller. That's why
> app/views/static_pages/index.html.erb is triggered.
>
> You placed the logic in app/controllers/places_controller.rb, which isn't
> where the view is being rendered.
>
> I'm in the process of making some explainer videos about rake routes, MVC
> and how the splurty app comes together. I should send a link to you in the
> next few days, which should make the lightbulb click.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/ericmseitz/platewarz/pull/1/files#r19167898>.
>