Module: OrdinaryCms::SmartPagesRender

Extended by:
ActiveSupport::Concern
Included in:
PagesController, RootController
Defined in:
app/controllers/ordinary_cms/concerns/smart_pages_render.rb

Instance Method Summary collapse

Instance Method Details

#smart_render(page_name) ⇒ Object



5
6
7
# File 'app/controllers/ordinary_cms/concerns/smart_pages_render.rb', line 5

def smart_render(page_name)
  render template_exists?("ordinary_cms/pages/#{page_name}") ? "ordinary_cms/pages/#{page_name}" : 'ordinary_cms/pages/show'
end