Sha256: fb82315876c85828daa9186678e24c4fd03ccfd4b2bdc79f553f00d64747d1ef

Contents?: true

Size: 813 Bytes

Versions: 58

Compression:

Stored size: 813 Bytes

Contents

module ActiveAdmin
  class Resource
    module PagePresenters

      # A hash of page configurations for the controller indexed by action name
      def page_presenters
        @page_presenters ||= {}
      end

      # Sets a page config for a given action
      #
      # @param [String, Symbol] action The action to store this configuration for
      # @param [PagePresenter] page_presenter The instance of PagePresenter to store
      def set_page_presenter(action, page_presenter)
        page_presenters[action.to_sym] = page_presenter
      end

      # Returns a stored page config
      #
      # @param [Symbol, String] action The action to get the config for
      # @returns [PagePresenter, nil]
      def get_page_presenter(action)
        page_presenters[action.to_sym]
      end

    end
  end
end

Version data entries

58 entries across 58 versions & 3 rubygems

Version Path
lalala-4.0.0.dev.58 vendor/deps/active_admin/lib/active_admin/resource/page_presenters.rb
lalala-4.0.0.dev.57 vendor/deps/active_admin/lib/active_admin/resource/page_presenters.rb
lalala-4.0.0.dev.56 vendor/deps/active_admin/lib/active_admin/resource/page_presenters.rb
lalala-4.0.0.dev.50 vendor/deps/active_admin/lib/active_admin/resource/page_presenters.rb
lalala-4.0.0.dev.46 vendor/deps/active_admin/lib/active_admin/resource/page_presenters.rb
activeadmin-0.5.1 lib/active_admin/resource/page_presenters.rb
activeadmin-0.5.0 lib/active_admin/resource/page_presenters.rb
activeadmin-0.5.0.pre1 lib/active_admin/resource/page_presenters.rb
activeadmin-0.5.0.pre lib/active_admin/resource/page_presenters.rb
activeadmin-0.4.4 lib/active_admin/resource/page_presenters.rb
activeadmin-0.4.3 lib/active_admin/resource/page_presenters.rb
activeadmin-0.4.2 lib/active_admin/resource/page_presenters.rb
activeadmin-0.4.1 lib/active_admin/resource/page_presenters.rb
activeadmin-0.4.0 lib/active_admin/resource/page_presenters.rb
andrewroth_activeadmin-0.3.4.4 lib/active_admin/resource/page_presenters.rb
andrewroth_activeadmin-0.3.4.3 lib/active_admin/resource/page_presenters.rb
andrewroth_activeadmin-0.3.4.2 lib/active_admin/resource/page_presenters.rb
andrewroth_activeadmin-0.3.4.1 lib/active_admin/resource/page_presenters.rb