ruby on rails - Move one controller's path under root namespace -


i copied following pages in welcome controller

views/welcome/about.haml views/welcome/brand.haml views/welcome/brand_detail.haml views/welcome/contact.haml views/welcome/download.haml views/welcome/faq.haml views/welcome/news.haml views/welcome/news_detail.haml views/welcome/product.haml views/welcome/product_detail.haml 

now write route in way

  'welcome/index'   'welcome/about' 

it seems repeat welcome many times , namespace not under root.

if understand correctly, want following in config/routes.rb:

get 'about', to: 'welcome#about' 'brand', to: 'welcome#brand'  ... , on ...  root 'welcome#index'   

Comments

Popular posts from this blog

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -