Sha256: 4a7a09b44837c50ac474018547f94fe2b8870677356fff9b46593a18cac69998

Contents?: true

Size: 655 Bytes

Versions: 17

Compression:

Stored size: 655 Bytes

Contents

# frozen_string_literal: true
module ActiveAdmin
  module Views
    module Pages
      class Page < Base

        def main_content
          if page_presenter.block
            instance_exec &page_presenter.block
          else
            nil
          end
        end

        protected

        def page_presenter
          active_admin_config.get_page_presenter(:index) || ActiveAdmin::PagePresenter.new
        end

        def title
          if page_presenter[:title]
            render_or_call_method_or_proc_on self, page_presenter[:title]
          else
            active_admin_config.name
          end
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
activeadmin-3.2.5 lib/active_admin/views/pages/page.rb
activeadmin-3.2.4 lib/active_admin/views/pages/page.rb
activeadmin-3.2.3 lib/active_admin/views/pages/page.rb
activeadmin-3.2.2 lib/active_admin/views/pages/page.rb
activeadmin-3.2.1 lib/active_admin/views/pages/page.rb
activeadmin-3.2.0 lib/active_admin/views/pages/page.rb
activeadmin-3.1.0 lib/active_admin/views/pages/page.rb
activeadmin-3.0.0 lib/active_admin/views/pages/page.rb
activeadmin-2.14.0 lib/active_admin/views/pages/page.rb
activeadmin-2.13.1 lib/active_admin/views/pages/page.rb
activeadmin-2.13.0 lib/active_admin/views/pages/page.rb
activeadmin-2.12.0 lib/active_admin/views/pages/page.rb
activeadmin-2.11.2 lib/active_admin/views/pages/page.rb
activeadmin-2.11.1 lib/active_admin/views/pages/page.rb
activeadmin-2.11.0 lib/active_admin/views/pages/page.rb
activeadmin-2.10.1 lib/active_admin/views/pages/page.rb
activeadmin-2.10.0 lib/active_admin/views/pages/page.rb