HI, How to specify default action for particular actioncontroller? Currently when I m typing the URL as "http:\\localhost:3000\actioncontroller_name" , then I m getting the default actin page as list.rHtml. But instead I want my action page to be index.rHtml. How to do it? Thanx. Prash
on 2006-03-17 08:33
on 2006-03-17 09:50
Prashant Tiwari wrote: > HI, > > How to specify default action for particular actioncontroller? Currently > when I m typing the URL as "http:\\localhost:3000\actioncontroller_name" > , then I m getting the default actin page as list.rHtml. But instead I > want my action page to be index.rHtml. If you built your controller using scaffolding, it will automatically have an 'index' that uses the list method. Open up the controller and remove the following lines from 'index': list render :action => 'list' You can now use the view index.rhtml. Hope that helps.
on 2006-03-17 12:22
The index action is the default action. Did you generate your action using scaffolding? If so, I believe the index redirects to the list action. Another place to check is in your config/routes.rb. Tom On 3/17/06, Prashant Tiwari <email@example.com> wrote: > > Prash > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > -- Tom Davies http://blog.atomgiant.com http://gifthat.com