Module: Sinicum::ControllerBase

Extended by:
ActiveSupport::Concern
Includes:
Sinicum::Controllers::CacheAware
Included in:
ContentController
Defined in:
app/controllers/sinicum/controller_base.rb

Defined Under Namespace

Modules: ClassMethods

Constant Summary collapse

HTML_SUFFIX =
".html"

Constants included from Sinicum::Controllers::CacheAware

Sinicum::Controllers::CacheAware::DEFAULT_CACHE_EXPIRATION_TIME, Sinicum::Controllers::CacheAware::TIMESTAMP_ASSET_EXPIRATION_TIME

Instance Method Summary collapse

Methods included from Sinicum::Controllers::CacheAware

#client_cache_control

Instance Method Details

#cms_renderObject

Deprecated!



29
30
31
32
# File 'app/controllers/sinicum/controller_base.rb', line 29

def cms_render
  client_cache_control
  render inline: "", use_sinicum_template_layout: true
end

#indexObject



15
16
17
# File 'app/controllers/sinicum/controller_base.rb', line 15

def index
  cms_render
end

#render(options = {}, locals = {}, &block) ⇒ Object



19
20
21
22
23
24
25
26
# File 'app/controllers/sinicum/controller_base.rb', line 19

def render(options = {}, locals = {}, &block)
  find_original_content_for_path(content_path)
  unless redirect_redirect_page
    check_for_content!
    options[:layout] = layout_file_name_or_fallback
    block_given? ? super(options, locals, block) : super(options, locals)
  end
end