# Custom Form Builder gives error

**URL:** <https://www.ruby-forum.com/t/custom-form-builder-gives-error/71137>\
**Category:** Rails\
**Created:** [October 5, 2006, 3:26pm UTC](https://www.ruby-forum.com/t/custom-form-builder-gives-error/71137 "2006-10-05T15:26:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![liquid](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/47e85d/32.png) [@liquid](https://www.ruby-forum.com/u/liquid)\
**Post date:** [October 5, 2006, 3:26pm UTC](https://www.ruby-forum.com/t/custom-form-builder-gives-error/71137/1 "2006-10-05T15:26:47Z")

</div>

Hi everyone,

I’ve been trying to get the form builder recipe to work in the Recipes  
book  
to work.

Just to start I’m trying to cut and past the code to get it happening.

When I put the class TabularFormBuilder into the application\_helper.rb I  
get  
the following error.

uninitialized constant  
ActionView::Base::CompiledTemplates::TabularFormBuilder

But when I move the class into my environment.rb it works no problem.

Any idea why this would be happening?

---

<div class="post-metadata">

**Author:** ![liquid](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/47e85d/32.png) [@liquid](https://www.ruby-forum.com/u/liquid)\
**Post date:** [October 5, 2006, 3:48pm UTC](https://www.ruby-forum.com/t/custom-form-builder-gives-error/71137/2 "2006-10-05T15:48:52Z")

</div>

On 10/5/06, Daniel N [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> uninitialized constant ActionView::Base::CompiledTemplates::TabularFormBuilder
> 
> But when I move the class into my environment.rb it works no problem.
> 
> Any idea why this would be happening?

Solved. Needed to put the class definition outside the module  
ApplicationHelper but in the file.

Sorry for posting before I tried everything. It’s getting late I  
guess.
