Class: CmsContentController

Inherits:
ApplicationController show all
Defined in:
app/controllers/cms_content_controller.rb

Instance Method Summary collapse

Instance Method Details

#render_cssObject



19
20
21
# File 'app/controllers/cms_content_controller.rb', line 19

def render_css
  render :text => @cms_layout.css, :content_type => 'text/css'
end

#render_html(status = 200) ⇒ Object



10
11
12
13
14
15
16
17
# File 'app/controllers/cms_content_controller.rb', line 10

def render_html(status = 200)
  if layout = @cms_page.layout
    app_layout = layout.app_layout.blank?? false : layout.app_layout
    render :inline => @cms_page.content, :layout => app_layout, :status => status
  else
    render :text => 'Layout Not Found', :status => 404
  end
end

#render_jsObject



23
24
25
# File 'app/controllers/cms_content_controller.rb', line 23

def render_js
  render :text => @cms_layout.js, :content_type => 'text/javascript'
end