Sha256: 275f56b2680807967ea232d0a23868d4a2a21d6ec6f62955967c940f9553cdf2

Contents?: true

Size: 461 Bytes

Versions: 11

Compression:

Stored size: 461 Bytes

Contents

require_relative "base"

module Administrate
  module Page
    class Show < Page::Base
      def initialize(dashboard, resource)
        super(dashboard)
        @resource = resource
      end

      attr_reader :resource

      def page_title
        resource.to_s
      end

      def attributes
        dashboard.show_page_attributes.map do |attr_name|
          attribute_field(dashboard, resource, attr_name, :show)
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
administrate-0.1.0 lib/administrate/page/show.rb
administrate-0.0.12 lib/administrate/page/show.rb
administrate-0.0.11 lib/administrate/page/show.rb
administrate-0.0.10 lib/administrate/page/show.rb
administrate-0.0.9 lib/administrate/page/show.rb
administrate-0.0.8 lib/administrate/page/show.rb
administrate-0.0.7 lib/administrate/page/show.rb
administrate-0.0.6 lib/administrate/page/show.rb
administrate-0.0.4 lib/administrate/pages/show.rb
administrate-0.0.3 lib/administrate/pages/show.rb
administrate-0.0.2 lib/administrate/pages/show.rb