# ActiveResource new form

**URL:** <https://www.ruby-forum.com/t/activeresource-new-form/141003>\
**Category:** Rails\
**Created:** [June 20, 2008, 6:08pm UTC](https://www.ruby-forum.com/t/activeresource-new-form/141003 "2008-06-20T18:08:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rlwinter](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecccb3/32.png) [@rlwinter](https://www.ruby-forum.com/u/rlwinter)\
**Post date:** [June 20, 2008, 6:08pm UTC](https://www.ruby-forum.com/t/activeresource-new-form/141003/1 "2008-06-20T18:08:27Z")

</div>

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/](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”)
