ericmseitz/rtSpots — pull request #1 by kenmazaika (2014-09-19 14:56:26+00:00)
Title: Fix comment form error

Here's what the problem was. We put the `def show` twice inside our application. Inside the top one, we have the `@comment = Comment.new`, which sets the comment, but in the bottom one we do not. You'd probably expect ruby to throw an error message if you define the same thing twice, but it actually just takes and uses the last thing that was defined.

Also there was a typo with the submit button, which I fixed. After removing the bottom `def show` (notice there still is a show, but it as what we want), it works. Now the only `def show` in the controller looks like this:

```
def show
@spot = Spot.find(params[:id])
@comment = Comment.new
end
```

-------------------

As a side note, this is a GitHub pull request. This is how I can show you code that I think you should change in 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