This project is archived and is in readonly mode.

#2584 ✓committed
Matthew Moore

2.3.2 ActiveResource JSON doesn't send parameters with root node

Reported by Matthew Moore | April 30th, 2009 @ 06:40 PM | in 2.x

If you create a new 2.3.2 rails project with an ActiveResource model with format set to JSON, e.g.

class MyModel < ActiveResource::Base = "http://localhost:3001"
  self.format = :json
  self.timeout = 30

When you try to create a my_model, it won't send in the parameters correctly (it will be missing the root node):

> m = MyModel(:foo => 'bar')

The parameters sent to the server should be


Instead, it's just:


On the other hand, if you set the format to :xml, you will get the correct parameters sent,


Comments and changes to this ticket

Create your profile

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

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

Referenced by