Prashant Tiwari
2006-Mar-17 07:33 UTC
[Rails] How to specify default action for particulr actioncontroller
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 -- Posted via http://www.ruby-forum.com/.
David
2006-Mar-17 08:51 UTC
[Rails] Re: How to specify default action for particulr actioncontro
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. -- Posted via http://www.ruby-forum.com/.
Tom Davies
2006-Mar-17 11:19 UTC
[Rails] How to specify default action for particulr actioncontroller
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 <tiwari_p_k@yahoo.com> 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. > > How to do it? > > Thanx. > > 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
Maybe Matching Threads
- How to find particular pattern in string?
- How to check for presence of particular value entered ?
- pls help me regarding Maths round up function.....
- How to get difference between two dates in days???
- Can anybody tell me step by step how validate data on form?