Sha256: 50319475a159a8a0fa12f0bd2e21333c47d331922ba9de032b9f5fbca8bcf52e

Contents?: true

Size: 636 Bytes

Versions: 22

Compression:

Stored size: 636 Bytes

Contents

module Plutonium
  module Core
    module Fields
      module Renderers
        class AssociationRenderer < Base
          attr_reader :reflection

          def initialize(name, reflection:, **user_options)
            @reflection = reflection
            super(name, **user_options)
          end

          def render
            display_field value:, **options
          end

          private

          def renderer_options
            {
              # helper: value.class.include?(Plutonium: :Resource: :Record) ? :display_association_value : :display_name_of
            }
          end
        end
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
plutonium-0.15.18 lib/plutonium/core/fields/renderers/association_renderer.rb
plutonium-0.15.17 lib/plutonium/core/fields/renderers/association_renderer.rb
plutonium-0.15.16 lib/plutonium/core/fields/renderers/association_renderer.rb
plutonium-0.15.15 lib/plutonium/core/fields/renderers/association_renderer.rb
plutonium-0.15.14 lib/plutonium/core/fields/renderers/association_renderer.rb
plutonium-0.15.13 lib/plutonium/core/fields/renderers/association_renderer.rb
plutonium-0.15.12 lib/plutonium/core/fields/renderers/association_renderer.rb
plutonium-0.15.11 lib/plutonium/core/fields/renderers/association_renderer.rb
plutonium-0.15.10 lib/plutonium/core/fields/renderers/association_renderer.rb
plutonium-0.15.9 lib/plutonium/core/fields/renderers/association_renderer.rb
plutonium-0.15.8 lib/plutonium/core/fields/renderers/association_renderer.rb
plutonium-0.15.7 lib/plutonium/core/fields/renderers/association_renderer.rb
plutonium-0.15.6 lib/plutonium/core/fields/renderers/association_renderer.rb
plutonium-0.15.5 lib/plutonium/core/fields/renderers/association_renderer.rb
plutonium-0.15.4 lib/plutonium/core/fields/renderers/association_renderer.rb
plutonium-0.15.3 lib/plutonium/core/fields/renderers/association_renderer.rb
plutonium-0.15.2 lib/plutonium/core/fields/renderers/association_renderer.rb
plutonium-0.15.1 lib/plutonium/core/fields/renderers/association_renderer.rb
plutonium-0.15.0 lib/plutonium/core/fields/renderers/association_renderer.rb
plutonium-0.15.0.pre.rc3 lib/plutonium/core/fields/renderers/association_renderer.rb