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
Post a Comment