Sha256: a78b11b50db59ed7593622874114fd31c1bfa04b2f72ff2690a6b16d96953979

Contents?: true

Size: 226 Bytes

Versions: 38

Compression:

Stored size: 226 Bytes

Contents

module Noodall
  class TextField < Noodall::Field
    key :rows, Integer, :default => 1
    
    before_validation :constrain_rows
    
    def constrain_rows
      rows = rows.to_i
      rows = 1 if rows < 1
    end
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
noodall-form-builder-0.2.1 app/models/noodall/text_field.rb
noodall-form-builder-0.2.0 app/models/noodall/text_field.rb
noodall-form-builder-0.1.3 app/models/noodall/text_field.rb
noodall-form-builder-0.1.2 app/models/noodall/text_field.rb
noodall-form-builder-0.1.1 app/models/noodall/text_field.rb
noodall-form-builder-0.1.0 app/models/noodall/text_field.rb
noodall-form-builder-0.0.13 app/models/noodall/text_field.rb
noodall-form-builder-0.0.11 app/models/noodall/text_field.rb
noodall-form-builder-0.0.10 app/models/noodall/text_field.rb
noodall-form-builder-0.0.9 app/models/noodall/text_field.rb
noodall-form-builder-0.0.8 app/models/noodall/text_field.rb
noodall-form-builder-0.0.7 app/models/noodall/text_field.rb
noodall-form-builder-0.0.6 app/models/noodall/text_field.rb
noodall-form-builder-0.0.5 app/models/noodall/text_field.rb
noodall-form-builder-0.0.4 app/models/noodall/text_field.rb
noodall-form-builder-0.0.3 app/models/noodall/text_field.rb
noodall-form-builder-0.0.2 app/models/noodall/text_field.rb
noodall-form-builder-0.0.1 app/models/noodall/text_field.rb