[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Create controller dynamically?

Varun Goel

4/24/2008 2:38:00 PM

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
--
Posted via http://www.ruby-....

2 Answers

Glen Holcomb

4/24/2008 2:53:00 PM

0

[Note: parts of this message were removed to make it a legal post.]

On Thu, Apr 24, 2008 at 8:37 AM, Varun Goel <varun.rajeshkumar@gmail.com>
wrote:

> 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
> --
> Posted via http://www.ruby-....
>
>
You really probably want to post this on the rails list. It is probably
do-able but the structure of rails puts it a bit beyond the scope of just
ruby. You will have to dynamically define classes but with rails assuming
those classes will be in separate files you might have to do some
significant unpleasantness.

--
"Hey brother Christian with your high and mighty errand, Your actions speak
so loud, I can't hear a word you're saying."

-Greg Graffin (Bad Religion)

Phlip

4/24/2008 2:55:00 PM

0

Varun Goel wrote:

> 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.

What's the actual problem you need to solve?

A controller is (generally) a class, with instances declared on the fly, one per
input event.

Also, if you mean a Rails controller, you might get better help on a Rails
forum. Ruby is not Rails!

--
Phlip