ActiveResource new form

Hello,

I’m experimenting with ActiveResouce and created a very simple server
and client application with a single Person resource.

I am getting the following error when trying to use the new person
form:

undefined method ‘first_name’ for #Person:0x215dacc

The same form works fine on the server application using the
ActiveRecord.

Here is my AR model:

class Person < ActiveResource::Base
self.site = “http://localhost:3000/”
end

And my view:

New person

<% form_for(@person) do |f| %>
<%= f.error_messages %>

<%= f.label :first_name %>
<%= f.text_field :first_name %>

<%= f.label :last_name %>
<%= f.text_field :last_name %>

<%= f.submit "Create" %>

<% end %>

<%= link_to ‘Back’, people_path %>

The odd thing is that I can create new Person objects from script/
console.
p = Person.new(:first_name => “Robert”, :last_name => “Walker”)