Class: TemplatesController
- Inherits:
-
Object
- Object
- TemplatesController
- Defined in:
- app/controllers/templates_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
2 3 4 |
# File 'app/controllers/templates_controller.rb', line 2 def index render :index, layout: 'templates/index' end |
#show ⇒ Object
6 7 8 9 10 11 12 |
# File 'app/controllers/templates_controller.rb', line 6 def show if params[:id].present? && File.directory?("./app/views/templates/#{params[:id]}") render :nested_index, layout: 'templates/index' else render "templates/#{params[:id]}", layout: 'templates/show' end end |