Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Mark Lewis
Mark Lewis
4,094 Points

Incorrect HTTP Methods

I believe POST and PUT got mixed up at the beginning of this video. POST is to create and PUT is to update.

4 Answers

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

Please link the video you are referring to.

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

You seem to be right. Technically you could try to use POST for updating, but this is not the convention and Rails favors convention over configuration (this seems like fighting convention when it's unnecessary). I will notify the support.

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

I contact support a lot these days...

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

Sidenote: PATCH is the preferred update verb right now.

Mark Lewis
Mark Lewis
4,094 Points

Later on in the video (around 2:00-3:00) POST is labeled correctly as the Create method.

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

It seems the course got rolled out too soon, so we - the students - are making quality check in production :)

Mark Lewis
Mark Lewis
4,094 Points

Definitely seems that way. :) I already know most of the information in the course so I just wanted to check it out as a review and see if there was anything new so it didn't really affect me, but I'd hate for a new student to learn that misinformation.