Hi, Can anyone tell me how can I achieve this: Say if I have a e-commerce site, I want to list all the products when user type in www.mysite.com Not www.mysite.com/products Please note there is no controller in the URL, how do I replace the default Rails index.html and display my products page. Hope my question makes sense. -- Best regards, Ming Ma
Brian Hutchison
2006-Jul-22 21:03 UTC
[Rails] Newbie: Replacing index.html in public folder
Look into routes, e.g. routes.rb. Off the top of my head I''d try something like: map.connect '''', :controller => ''products'', :action => ''list Check out: http://manuals.rubyonrails.com/read/chapter/65 Hope this helps. - Brian On 7/22/06, Ming Ma <mingworld@gmail.com> wrote:> > Hi, > > Can anyone tell me how can I achieve this: > Say if I have a e-commerce site, I want to list all the products when > user type in www.mysite.com Not www.mysite.com/products > > Please note there is no controller in the URL, how do I replace the > default Rails index.html and display my products page. > > Hope my question makes sense. > > -- > Best regards, > > Ming Ma > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060722/027cec44/attachment-0001.html
Brian Hutchison
2006-Jul-22 21:04 UTC
[Rails] Newbie: Replacing index.html in public folder
Sigh... I hate it when I type "e.g." when I meant "i.e." - I''m usually stickler for such things. :/ On 7/22/06, Brian Hutchison <b.hutchison@gmail.com> wrote:> > Look into routes, e.g. routes.rb. Off the top of my head I''d try something > like: > map.connect '''', :controller => ''products'', :action => ''list > > Check out: > http://manuals.rubyonrails.com/read/chapter/65 > > Hope this helps. > > - Brian > > > On 7/22/06, Ming Ma < mingworld@gmail.com> wrote: > > > > Hi, > > > > Can anyone tell me how can I achieve this: > > Say if I have a e-commerce site, I want to list all the products when > > user type in www.mysite.com Not www.mysite.com/products > > > > Please note there is no controller in the URL, how do I replace the > > default Rails index.html and display my products page. > > > > Hope my question makes sense. > > > > -- > > Best regards, > > > > Ming Ma > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060722/49d5b68a/attachment.html
Thanks for your help. On 7/23/06, Brian Hutchison <b.hutchison@gmail.com> wrote:> Sigh... I hate it when I type "e.g." when I meant "i.e." - I''m usually > stickler for such things. :/ > > > On 7/22/06, Brian Hutchison < b.hutchison@gmail.com> wrote: > > > > Look into routes, e.g. routes.rb. Off the top of my head I''d try something > like: > > map.connect '''', :controller => ''products'', :action => ''list > > > > Check out: > > http://manuals.rubyonrails.com/read/chapter/65 > > > > Hope this helps. > > > > > > - Brian > > > > > > > > On 7/22/06, Ming Ma < mingworld@gmail.com> wrote: > > > Hi, > > > > > > Can anyone tell me how can I achieve this: > > > Say if I have a e-commerce site, I want to list all the products when > > > user type in www.mysite.com Not www.mysite.com/products > > > > > > Please note there is no controller in the URL, how do I replace the > > > default Rails index.html and display my products page. > > > > > > Hope my question makes sense. > > > > > > -- > > > Best regards, > > > > > > Ming Ma > > > _______________________________________________ > > > Rails mailing list > > > Rails@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-- Best regards, Ming Ma
Seemingly Similar Threads
- Step-by-Step Tutorial: How to Setup Your Own e-Commerce Online Store using WooCommerce 3.4.5, Wordpress 4.9.8, and CentOS 1805 (LAMP) in Amazon AWS Cloud
- Missing text/html content in production (but not development)
- Newbie: populate 2nd dropdown list based on user''s selection in 1st dropdown list
- Newbie Question on Link_to Method
- 31K failed stat64's when viewing a simple (no db) rhtml page?