configure route to page that is in subfolder rails -


i have design.html.erb file in folder views/services/

how configure route page in routes.rb? (i have controller static pages called static_pages_controller don't need backend actions) need this:

  '/services/design' => 'static_pages#what_to_write_here' 

get '/services/design' => 'static_pages#design' 

this render design.html.erb inside views/static_pages/ directory.

in order specify view in sub-folder have specify in action:

def design   render 'services/design' end 

this render design.html.erb inside views/services/ directory.


Comments

Popular posts from this blog

php - Passing multiple values in a url using checkbox -

compilation - PHP install fails on Ubuntu 14 (make: *** [sapi/cli/php] Error 1) PHP 5.6.20 -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -