#6 ✓resolved
Guilherme Silveira

Should allow server side 201 with one cute line of code

Reported by Guilherme Silveira | April 3rd, 2010 @ 08:41 PM | in v0.9

In order to support 201 on resource creation, Restfulie currently requires you to:

1) respond_with @order, :status => 201, :location => order_url(@order)
and create a create.tokamak file

2) render :text => "" , :status => 201, :location => order_url(@order)

(head 201, :location ...) is not an option because Rails seems to wrongly send a one whitespace string as a result.

Both should be easier implemented as something like the following, automatically noticing its a 201 and requires the Resource location, while rendering it with the resource itself (show.tokamak).

respond_with @order, :status => 201

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket

Pages