nice-ambulance-76519
08/03/2023, 12:15 PMAnswer belongs_to :icon
and Icon has_many :answers
In the Answer resource I've added field :icon, as: :belongs_to
.
Do you know if it's possible to show the rendered SVG in the select field that's generated instead of the name?lemon-wall-20836
08/03/2023, 7:45 PMshow
and hide the other one
ruby
field :icon, as: :belongs_to, hide_on: :show
field :rendered_icon,
as: :text,
as_html: true, # enables it to be rendered as HTML
only_on: :show, # show it only on the show view
format_using: -> {
model.icon.content # get the content from teh associated `icon`
}