# Getting acquainted with REST

**URL:** <https://www.ruby-forum.com/t/getting-acquainted-with-rest/168011>\
**Category:** Rails\
**Created:** [May 14, 2009, 11:08pm UTC](https://www.ruby-forum.com/t/getting-acquainted-with-rest/168011 "2009-05-14T23:08:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bouldr-matt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/85e7bf/32.png) [@bouldr-matt](https://www.ruby-forum.com/u/bouldr-matt)\
**Post date:** [May 14, 2009, 11:08pm UTC](https://www.ruby-forum.com/t/getting-acquainted-with-rest/168011/1 "2009-05-14T23:08:38Z")

</div>

I’ve been using RoR since 2.0 came out, and I’ve made several small  
scale sites. Recently I’ve started trying to get into better habits, so  
I’m now using rspec and cucumber with BDD to create my sites.

Another thing I’m trying to do is be faithful to the RESTful design.  
I’ve got a small problem though that I’m not sure how to solve and still  
be restful.

I’ve got a simple controller that will let users perform CRUD actions,  
and I’ve got routes mapped out with

map.resources :events

This seems to work ok when testing with webrat and cucumber, but a  
problem emerges when trying it from a browser:

events\_path renders events/index as expected, however I’m planning to  
use events\_path with method POST to get to events/create. That will be a  
form that will post to new\_event (events/new).

Unfortunately, the browser (in this case firefox 3) doesn’t respect the  
method argument to the link and just sends it as a GET.

Am I doing something totally crazy or have I just missed something?

I can post code if necessary but it really is vanilla stuff.

Grateful for any ideas.

~Matt

---

<div class="post-metadata">

**Author:** ![bouldr-matt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/85e7bf/32.png) [@bouldr-matt](https://www.ruby-forum.com/u/bouldr-matt)\
**Post date:** [May 14, 2009, 11:12pm UTC](https://www.ruby-forum.com/t/getting-acquainted-with-rest/168011/2 "2009-05-14T23:12:45Z")

</div>

Matt H. wrote:

> method argument to the link and just sends it as a GET.
> 
> Am I doing something totally crazy or have I just missed something?

And as I thought, I was doing something incredibly stupid. Obviously I  
should reverse the roles of create and new, I guess I shouldn’t drink  
while I’m learning new methods 😉

Sorry for the list pollution.
