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



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

Reply via email to