Change "action_name" to "action1_name". Thanks, Al Snow Linkedin: http://www.linkedin.com/in/alsnow Google Talk: jasnow1 Twitter: jasnow
> Date: Fri, 1 May 2009 16:13:15 -0700 > Subject: [rails-development] Problem with Rails Action Controller exercise 1.5 > From: [email protected] > To: [email protected] > > > Hi, > > I've encountered a strange problem with exercise 1.5 of the Rails > Action Controller lesson, which doesn't turn out as described in the > exercise description. > > The controller has the statements: > > @controller_name = params[:controller] > @action_name = params[:action] > > and the say_hello.rhtml has: > > Controller is <%= @controller_name %> > <br/> > Action was <%= @action_name %> ! > <br/> > > When I run it, the screen shows nothing for the action, i.e., > > Controller is hello > Action is > > I checked the log and the params[:action] is definitely "index". > > After some fooling around, I determined that it works fine, if I > change the variable name to anything other than @action_name. For > example, if I make it "@action_nam" or "@actionx", then it works. > > Any ideas why? Is "@action_name" a pre-defined variable or something, > which gets set internally after the controller changes the value? > > --Wes > > > > > _________________________________________________________________ Rediscover HotmailĀ®: Get e-mail storage that grows with you. http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage2_042009 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "ruby-on-rails-programming-with-passion" group. To unsubscribe from this group, send email to ruby-on-rails-programming-with-passion-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/ruby-on-rails-programming-with-passion?hl=en?hl=en -~----------~----~----~----~------~----~------~--~---
