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

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -