Sha256: 05ea6900edbdeab64171bebddc084bbee2994af4bfe9c9f0529a8df15f484fe0

Contents?: true

Size: 476 Bytes

Versions: 5

Compression:

Stored size: 476 Bytes

Contents

module Avo
  module Fields
    class BadgeField < BaseField
      def initialize(name, **args, &block)
        @defaults = {
          partial_name: 'badge-field',
        }

        super(name, **args, &block)

        hide_on [:edit, :new]

        default_options = { info: :info, success: :success, danger: :danger, warning: :warning }
        @meta[:options] = args[:options].present? ? default_options.merge(args[:options]) : default_options
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
avo-0.5.0.beta9 lib/avo/fields/badge_field.rb
avo-0.5.0.beta8 lib/avo/fields/badge_field.rb
avo-0.5.0.beta7 lib/avo/fields/badge_field.rb
avo-0.5.0.beta6 lib/avo/fields/badge_field.rb
avo-0.5.0.beta5 lib/avo/fields/badge_field.rb