Sha256: 4530a00169c2b1d391d964cb331c21ea9d65754c80e03306715853aed0ba03a1

Contents?: true

Size: 368 Bytes

Versions: 49

Compression:

Stored size: 368 Bytes

Contents

module Para
  module AttributeField
    class BooleanField < AttributeField::Base
      register :boolean, :bool, self

      field_option :wrapper, :wrapper_name

      def value_for(instance)
        ::I18n.t("para.types.boolean.#{ (!!instance.send(name)).to_s }")
      end

      def wrapper_name
        :vertical_radio_and_checkboxes
      end
    end
  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
para-0.12.4 lib/para/attribute_field/boolean.rb
para-0.12.3 lib/para/attribute_field/boolean.rb
para-0.12.2 lib/para/attribute_field/boolean.rb
para-0.12.1 lib/para/attribute_field/boolean.rb
para-0.12.0 lib/para/attribute_field/boolean.rb
para-0.11.4 lib/para/attribute_field/boolean.rb
para-0.11.3 lib/para/attribute_field/boolean.rb
para-0.11.2 lib/para/attribute_field/boolean.rb
para-0.11.1 lib/para/attribute_field/boolean.rb
para-0.11.0 lib/para/attribute_field/boolean.rb
para-0.10.0 lib/para/attribute_field/boolean.rb
para-0.9.4 lib/para/attribute_field/boolean.rb
para-0.9.3.3 lib/para/attribute_field/boolean.rb
para-0.9.3.2 lib/para/attribute_field/boolean.rb
para-0.9.3.1 lib/para/attribute_field/boolean.rb
para-0.9.2 lib/para/attribute_field/boolean.rb
para-0.9.0 lib/para/attribute_field/boolean.rb
para-0.8.15 lib/para/attribute_field/boolean.rb
para-0.8.14 lib/para/attribute_field/boolean.rb
para-0.8.13 lib/para/attribute_field/boolean.rb