Sha256: 706669bdc1e98c05423f1ca4f991397aa38c31f4f32e2b9cf21650ba6c1f2f1a
Contents?: true
Size: 569 Bytes
Versions: 29
Compression:
Stored size: 569 Bytes
Contents
module Avo module Fields class MarkdownField < BaseField def initialize(name, **args, &block) @defaults = { partial_name: "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
29 entries across 29 versions & 1 rubygems