Sha256: 73d7928a7544e9ef178923a58a86cb35271a62e60b0fa09498d348932d9348a4
Contents?: true
Size: 360 Bytes
Versions: 3
Compression:
Stored size: 360 Bytes
Contents
class TemplatesController < ActionController::Base def index render :index, layout: 'templates/index' end 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 end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
templates-rails-0.1.4 | app/controllers/templates_controller.rb |
templates-rails-0.1.3 | app/controllers/templates_controller.rb |
templates-rails-0.1.2 | app/controllers/templates_controller.rb |