Sha256: f634f8c7efd6be69ea09fd3e49c4a7928b48c1f952aadc71ec52bc4184fd2242

Contents?: true

Size: 312 Bytes

Versions: 6

Compression:

Stored size: 312 Bytes

Contents

module CMS
  class PagesController < RailsAdminCMS::Config.parent_controller
    def show
      @cms_view = Viewable::Page.find(params[:id]) if params[:id].present?

      if @cms_view
        render @cms_view.view_path
      else
        render "cms/pages/#{params[:cms_view_type]}"
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rails_admin_cms-0.0.6 app/controllers/cms/pages_controller.rb
rails_admin_cms-0.0.5 app/controllers/cms/pages_controller.rb
rails_admin_cms-0.0.4 app/controllers/cms/pages_controller.rb
rails_admin_cms-0.0.3 app/controllers/cms/pages_controller.rb
rails_admin_cms-0.0.2 app/controllers/cms/pages_controller.rb
rails_admin_cms-0.0.1 app/controllers/cms/pages_controller.rb