This project is archived and is in readonly mode.

#2842 ✓stale
Mauricio Eduardo Szabo

Error in Rest when I try to serialize Array

Reported by Mauricio Eduardo Szabo | June 26th, 2009 @ 03:12 PM | in 3.x

If I create a rails application, create a model like this:

class Person < ActiveRecord::Base
serialize Array :course_years end

and, for example, insert a person using:
Person.create! :name => 'Mauricio', :course_years => [1992, 2008]

When I try to access this controller using RESTFul (Using ActiveResource::Base) I got the following error:

ArgumentError: expected an attributes Hash, got 1992

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="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Pages