I figured it would be the easiest thing to do but for some odd reason I am having a hard time to figure out how to do this. I can get the action using @action_name but I can''t get the controller using @controller_name. What is the correct way to go about doing this? Thanks for your help. Your Friend, John Kopanas -- http://www.soen.info - where software engineering knowledge gets indexed http://cusec.soen.info - software engineering conference
I use the following and it seems to work: @params[:controller] Regards, Michael John Kopanas <john-O1KSuMybMhqBUy7/sJONFg@public.gmane.org> wrote: I figured it would be the easiest thing to do but for some odd reason I am having a hard time to figure out how to do this. I can get the action using @action_name but I can''t get the controller using @controller_name. What is the correct way to go about doing this? Thanks for your help. Your Friend, John Kopanas -- http://www.soen.info - where software engineering knowledge gets indexed http://cusec.soen.info - software engineering conference _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails --------------------------------- Yahoo! FareChase - Search multiple travel sites in one click. _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
And to see the other params available: <%= debug(params) %> within your view. Regards, Michael John Kopanas <john-O1KSuMybMhqBUy7/sJONFg@public.gmane.org> wrote: I figured it would be the easiest thing to do but for some odd reason I am having a hard time to figure out how to do this. I can get the action using @action_name but I can''t get the controller using @controller_name. What is the correct way to go about doing this? Thanks for your help. Your Friend, John Kopanas -- http://www.soen.info - where software engineering knowledge gets indexed http://cusec.soen.info - software engineering conference _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails --------------------------------- Yahoo! FareChase - Search multiple travel sites in one click. _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
I use controller.controller_name John Kopanas wrote:> I figured it would be the easiest thing to do but for some odd reason I > am having a hard time to figure out how to do this. > > I can get the action using @action_name but I can''t get the controller > using @controller_name. What is the correct way to go about doing this? > > Thanks for your help. > > Your Friend, > > John Kopanas > > -- > http://www.soen.info - where software engineering knowledge gets indexed > http://cusec.soen.info - software engineering conference
Not sure why my last reply didn''t get to this list. I''ll try again - if it shows up then sorry for the duplicate post: @params[:controller] Regards, Michael John Kopanas <john-O1KSuMybMhqBUy7/sJONFg@public.gmane.org> wrote: I figured it would be the easiest thing to do but for some odd reason I am having a hard time to figure out how to do this. I can get the action using @action_name but I can''t get the controller using @controller_name. What is the correct way to go about doing this? Thanks for your help. Your Friend, John Kopanas -- http://www.soen.info - where software engineering knowledge gets indexed http://cusec.soen.info - software engineering conference _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails --------------------------------- Yahoo! FareChase - Search multiple travel sites in one click. _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
On Sun, 2005-11-13 at 13:12 -0800, Michael wrote:> I use the following and it seems to work: > > @params[:controller] >Michael, Just a quick, FYI... @params, @request, etc... are deprecated.[1] You can and should now use params, request, etc. [1] http://rubyurl.com/xaG (params v.s. @params in rails?) Cheers, Robby -- /****************************************************** * Robby Russell, Owner.Developer.Geek * PLANET ARGON, Open Source Solutions & Web Hosting * Portland, Oregon | p: 503.351.4730 | f: 815.642.4068 * www.planetargon.com | www.robbyonrails.com * Programming Rails | www.programmingrails.com *******************************************************/
Thank you Robby! Interestingly, I am new to Rails - I think I got the info from the agile book. I will switch accordingly... Michael Robby Russell <robby.lists-/Lcn8Y7Ot69QmPsQ1CNsNQ@public.gmane.org> wrote: On Sun, 2005-11-13 at 13:12 -0800, Michael wrote:> I use the following and it seems to work: > > @params[:controller] >Michael, Just a quick, FYI... @params, @request, etc... are deprecated.[1] You can and should now use params, request, etc. [1] http://rubyurl.com/xaG (params v.s. @params in rails?) Cheers, Robby -- /****************************************************** * Robby Russell, Owner.Developer.Geek * PLANET ARGON, Open Source Solutions & Web Hosting * Portland, Oregon | p: 503.351.4730 | f: 815.642.4068 * www.planetargon.com | www.robbyonrails.com * Programming Rails | www.programmingrails.com *******************************************************/ _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails --------------------------------- Yahoo! FareChase - Search multiple travel sites in one click. _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails