Eric Sloane
2005-Dec-16 03:37 UTC
Newbie Q: Controllers and lookup tables - when to initialise
Howdy Gang, in a major controller that has many methods using the same lookup tables for option choices and such, what is the life expectancy of the list instances. Is it useful to set these up in the controller initialize method - or is that utterly dumb? Cheers, Eric
Duane Johnson
2005-Dec-16 03:47 UTC
Re: Newbie Q: Controllers and lookup tables - when to initialise
On Dec 15, 2005, at 8:37 PM, Eric Sloane wrote:> Howdy Gang, > in a major controller that has many methods using the same lookup > tables for option choices and such, what is the life expectancy of > the list instances. Is it useful to set these up in the controller > initialize method - or is that utterly dumb? > Cheers, > Eric >Take a look at ActiveRecord Enumerations on the plugins page: http://wiki.rubyonrails.com/rails/pages/Plugins Duane Johnson (canadaduane) _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Eric Sloane
2005-Dec-16 05:38 UTC
Re: Newbie Q: Controllers and lookup tables - when to initialise
Looks like what I''m after Duane - Thanks - Eric Duane Johnson wrote:> > On Dec 15, 2005, at 8:37 PM, Eric Sloane wrote: > >> Howdy Gang, >> in a major controller that has many methods using the same lookup >> tables for option choices and such, what is the life expectancy of the >> list instances. Is it useful to set these up in the controller >> initialize method - or is that utterly dumb? >> Cheers, >> Eric >> > > Take a look at ActiveRecord Enumerations on the plugins page: > > http://wiki.rubyonrails.com/rails/pages/Plugins > > Duane Johnson > (canadaduane) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Eric Sloane
2005-Dec-16 05:42 UTC
Re: Newbie Q: Controllers and lookup tables - when to initialise
Hi again - Actually would that also answer my other question ; HOW DO I populate options from previous option click?> Hi, > I have a form with three drop down option lists. Currently each of these contain full listings as instantiated in the controller on entering the edit action. What I would like to do is filter the second list based on what the user selected on the first and the third filtered to reflect the second. > For example I have major_role, role and person_in_role = role is a subset of major_role and person_in_role is one qualified to act in role > Kind Regards, > EricThanks Mate, Eric. Duane Johnson wrote:> > On Dec 15, 2005, at 8:37 PM, Eric Sloane wrote: > >> Howdy Gang, >> in a major controller that has many methods using the same lookup >> tables for option choices and such, what is the life expectancy of the >> list instances. Is it useful to set these up in the controller >> initialize method - or is that utterly dumb? >> Cheers, >> Eric >> > > Take a look at ActiveRecord Enumerations on the plugins page: > > http://wiki.rubyonrails.com/rails/pages/Plugins > > Duane Johnson > (canadaduane) > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Duane Johnson
2005-Dec-16 16:05 UTC
Re: Re: Newbie Q: Controllers and lookup tables - when to initialise
On Dec 15, 2005, at 10:42 PM, Eric Sloane wrote:> Hi again - Actually would that also answer my other question ; > > HOW DO I populate options from previous option click? >> Hi, >> I have a form with three drop down option lists. Currently each of >> these contain full listings as instantiated in the controller on >> entering the edit action. What I would like to do is filter the >> second list based on what the user selected on the first and the >> third filtered to reflect the second. >> For example I have major_role, role and person_in_role = role is a >> subset of major_role and person_in_role is one qualified to act in >> role >> Kind Regards, >> Eric > > Thanks Mate, > Eric. >I would use something like qForms for this. It seems to do a nice job, and can interoperate with Rails conventions quite well. http://pengoworks.com/index.cfm?action=get:qforms Duane Johnson (canadaduane) _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails