# Fields\_for giving undefined method exception

**URL:** <https://www.ruby-forum.com/t/fields-for-giving-undefined-method-exception/60723>\
**Category:** Rails\
**Created:** [May 17, 2006, 12:50am UTC](https://www.ruby-forum.com/t/fields-for-giving-undefined-method-exception/60723 "2006-05-17T00:50:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jose](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e274bd/32.png) [@jose](https://www.ruby-forum.com/u/jose)\
**Post date:** [May 17, 2006, 12:50am UTC](https://www.ruby-forum.com/t/fields-for-giving-undefined-method-exception/60723/1 "2006-05-17T00:50:23Z")

</div>

I’m getting an undefined method exception with the fields\_for method.  
I’m following the gem examples. The form\_for works but when I add  
fields\_for it breaks.

Are there other examples of how this works anywhere?

---

<div class="post-metadata">

**Author:** ![jose](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e274bd/32.png) [@jose](https://www.ruby-forum.com/u/jose)\
**Post date:** [January 3, 2008, 7:15pm UTC](https://www.ruby-forum.com/t/fields-for-giving-undefined-method-exception/60723/2 "2008-01-03T19:15:54Z")

</div>

Hello,  
I am aslo getting the same error regarding undefined local variable or  
method. HAve you figured out what went wrong.  
Could you please tell me the solution if you have resolved it by now.  
Thanks.  
Regards,  
Anks

Jose wrote:

> I’m getting an undefined method exception with the fields\_for method.  
> I’m following the gem examples. The form\_for works but when I add  
> fields\_for it breaks.
> 
> Are there other examples of how this works anywhere?
