Sha256: 5415fae4c47b48c16c00c23b2b2677f8a46e0030e6dd70b816d1d4361f0eeb5a

Contents?: true

Size: 526 Bytes

Versions: 31

Compression:

Stored size: 526 Bytes

Contents

require_relative "base"

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

      attr_reader :resource

      def attributes
        dashboard.form_attributes.map do |attribute|
          attribute_field(dashboard, resource, attribute, :form)
        end
      end

      def page_title
        dashboard.display_resource(resource)
      end

      protected

      attr_reader :dashboard
    end
  end
end

Version data entries

31 entries across 31 versions & 3 rubygems

Version Path
viniBaxterDesk-22.0.0 lib/administrate/page/form.rb
viniBaxterDesk-0.21.0 lib/administrate/page/form.rb
viniBaxterDesk-0.20.0 lib/administrate/page/form.rb
viniBaxterDesk-0.14.0 lib/administrate/page/form.rb
viniBaxterDesk-0.13.2 lib/administrate/page/form.rb
viniBaxterDesk-0.13.1 lib/administrate/page/form.rb
administrate-0.13.0 lib/administrate/page/form.rb
administrate-0.12.0 lib/administrate/page/form.rb
administrate-0.11.0 lib/administrate/page/form.rb
semantic-administrate-0.10.1 lib/administrate/page/form.rb
semantic-administrate-0.10.0 lib/administrate/page/form.rb
administrate-0.10.0 lib/administrate/page/form.rb
semantic-administrate-0.1.1 lib/administrate/page/form.rb
administrate-0.9.0 lib/administrate/page/form.rb
semantic-administrate-0.1.0 lib/administrate/page/form.rb
administrate-0.8.1 lib/administrate/page/form.rb
administrate-0.8.0 lib/administrate/page/form.rb
administrate-0.7.0 lib/administrate/page/form.rb
administrate-0.6.0 lib/administrate/page/form.rb
administrate-0.5.0 lib/administrate/page/form.rb