Class: Cmsimple::SnippetsController
- Inherits:
-
Object
- Object
- Cmsimple::SnippetsController
- Defined in:
- app/controllers/cmsimple/snippets_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
4 5 6 |
# File 'app/controllers/cmsimple/snippets_controller.rb', line 4 def index render :index, layout: false end |
#options ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'app/controllers/cmsimple/snippets_controller.rb', line 13 def # the options prefix is to handle legacy snippets mercury # changed how it serializes snippets @options = params[:options][:snippet] if params[:options] @options ||= params[:snippet] @snippet = Cmsimple::Snippet.new params[:name], options: @options render text: render_cell(params[:name], :options, @snippet) end |