# Metaprogramming of controller methods

**URL:** <https://www.ruby-forum.com/t/metaprogramming-of-controller-methods/139379>\
**Category:** Rails\
**Created:** [June 3, 2008, 11:41am UTC](https://www.ruby-forum.com/t/metaprogramming-of-controller-methods/139379 "2008-06-03T11:41:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![indra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/5f9b8f/32.png) [@indra](https://www.ruby-forum.com/u/indra)\
**Post date:** [June 3, 2008, 11:41am UTC](https://www.ruby-forum.com/t/metaprogramming-of-controller-methods/139379/1 "2008-06-03T11:41:56Z")

</div>

Hello everyone,

my rails project parses a text file during the starting of mongrel and  
creates a structure of ruby classes, methods and objects out of it.

I then create a form with text\_field\_with\_auto\_completion dynamically  
from these objects (auto\_completion plugin). Now I need to have one  
auto\_complete\_for method for each of these fields in the controller.

But how can I write these methods (depending on ruby objects)  
dynamically during the mongrel start into the controller or make them  
accessible in it?
