Module: Plutonium::Definition::Metadata

Extended by:
ActiveSupport::Concern
Included in:
Base
Defined in:
lib/plutonium/definition/metadata.rb

Overview

Adds the ‘metadata` DSL — a list of field names rendered in the show page’s right-side panel as label/value rows. Opt-in: when no ‘metadata` call is made, the show page stays full-width with no aside.

Examples:

class PostDefinition < Plutonium::Definition::Base
   :created_at, :updated_at, :author, :state
end

Instance Method Summary collapse

Instance Method Details

#defined_metadata_fieldsObject

class_attribute is declared with instance_accessor: false; expose an instance reader that delegates so callers with a definition instance (e.g. ‘current_definition`) can ask without poking the class directly. Mirrors Definition::Views.



37
# File 'lib/plutonium/definition/metadata.rb', line 37

def  = self.class.