Sha256: e7a835ad4ad294b02f09f8abf072726d57b5ceb7219c6f62f9590462628a79a4
Contents?: true
Size: 725 Bytes
Versions: 26
Compression:
Stored size: 725 Bytes
Contents
# frozen_string_literal: true module Plutonium module UI module Display module Component class Association < Phlexi::Display::Components::Association include Plutonium::UI::Component::Methods def render_value(value) p(**attributes) { if registered_resources.include?(value.class) href = resource_url_for(value, parent: (field.association_reflection.macro == :has_many) ? field.object : nil) a(class: themed(:link), href:) { display_name_of value } else display_name_of value end } end end end end end end
Version data entries
26 entries across 26 versions & 1 rubygems