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.94 vendor/deps/active_admin/lib/active_admin/resource/page_presenters.rb
lalala-4.0.0.dev.92 vendor/deps/active_admin/lib/active_admin/resource/page_presenters.rb
lalala-4.0.0.dev.90 vendor/deps/active_admin/lib/active_admin/resource/page_presenters.rb
lalala-4.0.0.dev.84 vendor/deps/active_admin/lib/active_admin/resource/page_presenters.rb
lalala-4.0.0.dev.80 vendor/deps/active_admin/lib/active_admin/resource/page_presenters.rb
lalala-4.0.0.dev.79 vendor/deps/active_admin/lib/active_admin/resource/page_presenters.rb
lalala-4.0.0.dev.78 vendor/deps/active_admin/lib/active_admin/resource/page_presenters.rb
lalala-4.0.0.dev.77 vendor/deps/active_admin/lib/active_admin/resource/page_presenters.rb
lalala-4.0.0.dev.74 vendor/deps/active_admin/lib/active_admin/resource/page_presenters.rb
lalala-4.0.0.dev.73 vendor/deps/active_admin/lib/active_admin/resource/page_presenters.rb
lalala-4.0.0.dev.72 vendor/deps/active_admin/lib/active_admin/resource/page_presenters.rb
lalala-4.0.0.dev.71 vendor/deps/active_admin/lib/active_admin/resource/page_presenters.rb
lalala-4.0.0.dev.66 vendor/deps/active_admin/lib/active_admin/resource/page_presenters.rb
lalala-4.0.0.dev.65 vendor/deps/active_admin/lib/active_admin/resource/page_presenters.rb
lalala-4.0.0.dev.64 vendor/deps/active_admin/lib/active_admin/resource/page_presenters.rb
lalala-4.0.0.dev.63 vendor/deps/active_admin/lib/active_admin/resource/page_presenters.rb
lalala-4.0.0.dev.62 vendor/deps/active_admin/lib/active_admin/resource/page_presenters.rb
lalala-4.0.0.dev.61 vendor/deps/active_admin/lib/active_admin/resource/page_presenters.rb
lalala-4.0.0.dev.60 vendor/deps/active_admin/lib/active_admin/resource/page_presenters.rb
lalala-4.0.0.dev.59 vendor/deps/active_admin/lib/active_admin/resource/page_presenters.rb