Class: Maglev::PagesController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Maglev::PagesController
- Defined in:
- app/controllers/maglev/pages_controller.rb
Instance Method Summary collapse
-
#view ⇒ Object
Generic Page Viewing GET /:slug.
Instance Method Details
#view ⇒ Object
Generic Page Viewing GET /:slug
8 9 10 11 12 13 |
# File 'app/controllers/maglev/pages_controller.rb', line 8 def view @slug = params[:slug] @template = @slug ? @slug.gsub('-','_') : 'index' @layout = params[:layout] || Maglev.default_layout render template: "/site/#{@template}", layout: "/layouts/#{@layout}" end |