Using different controllers for different directories with the High Voltage in Ruby on Rails -
i'm trying create static pages in rails , using high voltage gem purpose.
what want have custom urls different subsets of pages. want override default high voltage controller in order use different layouts different pages.
so that, say, http://example.com/about render about.html.erb view in view/pages
folder. http://example.com/promo/1 render 1.html.erb page in view/pages/promo
folder.
i've disabled default routes in high_voltage.rb:
highvoltage.configure |config| config.routes = false end
and added router redirects urls promo
path promo controller:
get "/promo/*id" => 'promo#show', as: :promo, format: false
but promocontroller looks view files in /views/pages
folder. how tell render views /views/pages/promo
folder instead?
Comments
Post a Comment