Sha256: 2cc598c6cc342078b0f9f81c75e14fefcda539db81ff2bdd4a484211e1a2e819
Contents?: true
Size: 599 Bytes
Versions: 16
Compression:
Stored size: 599 Bytes
Contents
module Plutonium module Core module Fields module Renderers class AttachmentRenderer < BasicRenderer attr_reader :reflection def initialize(name, reflection:, **user_options) @reflection = reflection super(name, **user_options) end def render(view_context, record) view_context.attachment_preview record.send(name), **options end private def renderer_options { caption: true } end end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems