Sha256: df281771ddee5b7e22f1ed22378919f16d8aa4faefb96da2210635c532dd79d8
Contents?: true
Size: 570 Bytes
Versions: 5
Compression:
Stored size: 570 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
5 entries across 5 versions & 1 rubygems