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

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

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

asp.net mvc - breakpoint on javascript in CSHTML? -