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