Class: Oversee::Field::Value::BelongsTo

Inherits:
Oversee::Field::Value show all
Defined in:
app/components/oversee/field/value/belongs_to.rb

Constant Summary

Constants inherited from Oversee::Field::Value

MAP

Instance Attribute Summary

Attributes inherited from Oversee::Field::Value

#datatype, #key, #value

Instance Method Summary collapse

Methods inherited from Oversee::Field::Value

#initialize

Constructor Details

This class inherits a constructor from Oversee::Field::Value

Instance Method Details

#view_templateObject



2
3
4
5
6
7
8
9
10
# File 'app/components/oversee/field/value/belongs_to.rb', line 2

def view_template
  p(title: value, class:"inline-flex items-center gap-1") do
    if display_key?
      span { key.humanize }
      span {"|"}
    end
    span { value }
  end
end