On Mar 12, 2007, at 12:23 , David Edwards wrote:
> Why does a controller created with "ruby script/generate controller
> <NAME>" always have an action called list with the following
lines?
>
> 01 def index
> 02 list
> 03 render :action => ''list''
> 04 end
>
> I understand line 03 is there to define a default action, but what is
> the purpose of line 02?
Line #2 calls the list action so the code in that is run, setting up
list variables etc.
Line #3 renders the view from the list action, so the index action
looks like the list action.
--
Jakob Skjerning - http://mentalized.net
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---