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

Version Path
avo-1.3.0 lib/avo/fields/markdown_field.rb
avo-1.2.11.pre.4 lib/avo/fields/markdown_field.rb
avo-1.2.11.pre.3 lib/avo/fields/markdown_field.rb
avo-1.2.11.pre.2 lib/avo/fields/markdown_field.rb
avo-1.2.11.pre.1 lib/avo/fields/markdown_field.rb
avo-1.2.10 lib/avo/fields/markdown_field.rb
avo-1.2.9 lib/avo/fields/markdown_field.rb
avo-1.2.8 lib/avo/fields/markdown_field.rb
avo-1.2.7 lib/avo/fields/markdown_field.rb
avo-1.2.6 lib/avo/fields/markdown_field.rb
avo-1.2.6.pre.1 lib/avo/fields/markdown_field.rb
avo-1.2.5 lib/avo/fields/markdown_field.rb
avo-1.2.4 lib/avo/fields/markdown_field.rb
avo-1.2.3 lib/avo/fields/markdown_field.rb
avo-1.3.0.pre.1 lib/avo/fields/markdown_field.rb
avo-1.2.2 lib/avo/fields/markdown_field.rb
avo-1.1.0 lib/avo/fields/markdown_field.rb
avo-1.1.0.pre.1 lib/avo/fields/markdown_field.rb
avo-1.0.5 lib/avo/fields/markdown_field.rb
avo-1.0.4 lib/avo/fields/markdown_field.rb