Class: Comfy::Cms::ContentController
- Inherits:
-
BaseController
- Object
- BaseController
- Comfy::Cms::ContentController
- Defined in:
- app/controllers/comfy/cms/content_controller.rb
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'app/controllers/comfy/cms/content_controller.rb', line 17 def show if @cms_page.target_page.present? redirect_to @cms_page.target_page.url(relative: true) else respond_to do |format| format.html { render_page } format.json do @cms_page.content = render_to_string( inline: @cms_page.content_cache, layout: false ) json_page = @cms_page.as_json(ComfortableMexicanSofa.config.) render json: json_page end end end end |