Class: StaticAssetsController

Inherits:
SlicesController show all
Defined in:
app/controllers/static_assets_controller.rb

Instance Method Summary collapse

Methods inherited from SlicesController

should_raise_exceptions?

Instance Method Details

#templatesObject



9
10
11
12
13
14
# File 'app/controllers/static_assets_controller.rb', line 9

def templates
  templates_root = params[:slice] ? slice_templates : shared_templates
  path = File.join(templates_root, params[:name])
  path_with_format = [path, params[:format]].join '.'
  send_file_inline path_with_format, content_type: 'text/html; charset=utf-8'
end