# Create dynamic controller?

**URL:** <https://www.ruby-forum.com/t/create-dynamic-controller/135747>\
**Category:** Rails\
**Created:** [April 24, 2008, 4:38pm UTC](https://www.ruby-forum.com/t/create-dynamic-controller/135747 "2008-04-24T16:38:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![varunkumargoel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ed8c4c/32.png) [@varunkumargoel](https://www.ruby-forum.com/u/varunkumargoel)\
**Post date:** [April 24, 2008, 4:38pm UTC](https://www.ruby-forum.com/t/create-dynamic-controller/135747/1 "2008-04-24T16:38:21Z")

</div>

Hi All,  
I wanna create controller dynamically through my ruby code.

Please help me out.

Suppose i have one controller if i call a function of this controller so  
i wanna create another controller dynamically.That can be one or n  
numbers of controllers.

Please help me …  
Thanks  
Varun

---

<div class="post-metadata">

**Author:** ![varunkumargoel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ed8c4c/32.png) [@varunkumargoel](https://www.ruby-forum.com/u/varunkumargoel)\
**Post date:** [April 24, 2008, 5:38pm UTC](https://www.ruby-forum.com/t/create-dynamic-controller/135747/2 "2008-04-24T17:38:45Z")

</div>

You want to write code dynamically? I don’t think that’s going to be  
very easy to do… unless you just output files to your webserver,  
then restart your server each time?

I doubt very much this would be doable… would it?

On Apr 24, 10:38 am, Varun G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![varunkumargoel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ed8c4c/32.png) [@varunkumargoel](https://www.ruby-forum.com/u/varunkumargoel)\
**Post date:** [April 24, 2008, 5:48pm UTC](https://www.ruby-forum.com/t/create-dynamic-controller/135747/3 "2008-04-24T17:48:08Z")

</div>

This type of requirement seems to me to be the result of a bad design  
decision. Perhaps the first step would be telling us what requirement is  
causing you to want to write controllers dynamically.
