Sha256: 5d1efb154e93d16a89617920ba67c043330b0e732f7ebdf0af2e3291246303a9

Contents?: true

Size: 301 Bytes

Versions: 2

Compression:

Stored size: 301 Bytes

Contents

module PushType
  class RepeaterField < ArrayField
    
    def template
      @opts[:template] || :repeater
    end

    def to_json(val)
      return if val.blank?
      super.reject(&:blank?)
    end

    def from_json(val)
      return if val.blank?
      super.reject(&:blank?)
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
push_type_core-0.5.0.alpha.2 app/fields/push_type/repeater_field.rb
push_type_core-0.5.0.alpha.1 app/fields/push_type/repeater_field.rb