Sha256: 9ce1e982370d0f772e87d74e0d53d294c88d6a88b53cf1025ccdff4832745017

Contents?: true

Size: 641 Bytes

Versions: 7

Compression:

Stored size: 641 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"
        @spell_checker = args[:spell_checker].present? ? args[:spell_checker] : false
        @options = {
          spell_checker: @spell_checker,
          always_show: @always_show,
          height: @height
        }
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
avo-1.4.0.pre.1 lib/avo/fields/markdown_field.rb
avo-1.3.5 lib/avo/fields/markdown_field.rb
avo-1.3.5.pre.1 lib/avo/fields/markdown_field.rb
avo-1.3.4 lib/avo/fields/markdown_field.rb
avo-1.3.3 lib/avo/fields/markdown_field.rb
avo-1.3.2 lib/avo/fields/markdown_field.rb
avo-1.3.1 lib/avo/fields/markdown_field.rb