Sha256: ad8e285031be27180c6fa21956e8fe6b213fdd323d96cf80ce1139f025e194be
Contents?: true
Size: 589 Bytes
Versions: 10
Compression:
Stored size: 589 Bytes
Contents
require_relative 'field' module Avo module Fields class MarkdownField < Field def initialize(name, **args, &block) @defaults = { component: 'markdown-field', } super(name, **args, &block) hide_on :index @always_show = args[:always_show].present? ? args[:always_show] : false @height = args[:height].present? ? args[:height].to_s : 'auto' end def hydrate_field(fields, model, resource, view) { always_show: @always_show, height: @height } end end end end
Version data entries
10 entries across 10 versions & 1 rubygems