Sha256: 70c560fad5f1131172bc8860063ffbcc39d49bde5c397a8e77d456445b475fc9

Contents?: true

Size: 503 Bytes

Versions: 11

Compression:

Stored size: 503 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
        resource.to_s
      end

      protected

      attr_reader :dashboard
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

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