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.5.4 app/models/noodall/text_field.rb
noodall-form-builder-0.5.3 app/models/noodall/text_field.rb
noodall-form-builder-0.5.2 app/models/noodall/text_field.rb
noodall-form-builder-0.5.0 app/models/noodall/text_field.rb
noodall-form-builder-0.4.2 app/models/noodall/text_field.rb
noodall-form-builder-0.4.1 app/models/noodall/text_field.rb
noodall-form-builder-0.4.0 app/models/noodall/text_field.rb
noodall-form-builder-0.3.3 app/models/noodall/text_field.rb
noodall-form-builder-0.2.11 app/models/noodall/text_field.rb
noodall-form-builder-0.3.2 app/models/noodall/text_field.rb
noodall-form-builder-0.3.1 app/models/noodall/text_field.rb
noodall-form-builder-0.3.0 app/models/noodall/text_field.rb
noodall-form-builder-0.2.10 app/models/noodall/text_field.rb
noodall-form-builder-0.2.9 app/models/noodall/text_field.rb
noodall-form-builder-0.2.8 app/models/noodall/text_field.rb
noodall-form-builder-0.2.7 app/models/noodall/text_field.rb
noodall-form-builder-0.2.5 app/models/noodall/text_field.rb
noodall-form-builder-0.2.4 app/models/noodall/text_field.rb
noodall-form-builder-0.2.3 app/models/noodall/text_field.rb
noodall-form-builder-0.2.2 app/models/noodall/text_field.rb