Sha256: 6dfd1b0a5d7a9d62d1434f2562e13e5939af60ac362bdb659cd2738ff097a690

Contents?: true

Size: 315 Bytes

Versions: 29

Compression:

Stored size: 315 Bytes

Contents

module Schematic
  module Generator
    module Restrictions
      class Numericality < Base
        def generate(builder)
          for_validator ActiveModel::Validations::NumericalityValidator do |validator|
            builder.xs(:pattern, "value" => "\\d+")
          end
        end
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
schematic-0.6.2 lib/schematic/generator/restrictions/numericality.rb
schematic-0.6.1 lib/schematic/generator/restrictions/numericality.rb
schematic-0.6.0 lib/schematic/generator/restrictions/numericality.rb
schematic-0.5.9 lib/schematic/generator/restrictions/numericality.rb
schematic-0.5.8 lib/schematic/generator/restrictions/numericality.rb
schematic-0.5.7 lib/schematic/generator/restrictions/numericality.rb
schematic-0.5.6 lib/schematic/generator/restrictions/numericality.rb
schematic-0.5.5 lib/schematic/generator/restrictions/numericality.rb
schematic-0.5.4 lib/schematic/generator/restrictions/numericality.rb
schematic-0.5.3 lib/schematic/generator/restrictions/numericality.rb
schematic-0.5.2 lib/schematic/generator/restrictions/numericality.rb
schematic-0.5.1 lib/schematic/generator/restrictions/numericality.rb
schematic-0.5.0 lib/schematic/generator/restrictions/numericality.rb
schematic-0.4.4 lib/schematic/generator/restrictions/numericality.rb
schematic-0.4.3 lib/schematic/generator/restrictions/numericality.rb
schematic-0.4.2 lib/schematic/generator/restrictions/numericality.rb
schematic-0.4.1 lib/schematic/generator/restrictions/numericality.rb
schematic-0.4.0 lib/schematic/generator/restrictions/numericality.rb
schematic-0.3.8 lib/schematic/generator/restrictions/numericality.rb
schematic-0.3.7 lib/schematic/generator/restrictions/numericality.rb