Quick questions about link_to

Hi --

Gary Liang wrote:

e.g.

index.rhtml has:
<%= link_to 'nextpage' :action=>'show' %>
when it is clicked, it will take you to nextpage_controller, then
execute 'show', then stay in nextpage.rhtml.

If that is the case, action 'show' has to exist, even it is an empty
action, in order to take you from index.rhtml to nextpage.rhtml, right?

I make this question simplier.

Does it mean nextpage.rhtml must has a controller & action 'show', in order to transfer to from index.rhtml (index.rhtml has <%= link_to 'nextpage' :action=>'show' %> ?) to nextpage.rhtml.

You can have no show action, in which case it will be treated as just
a request to render show.rhtml. I usually like to put:

   def show
   end

in my controller anyway, just to denote the fact that I'm expecting
requests to it.

David