lib/schematic/generator/restrictions/numericality.rb in schematic-0.6.2 vs lib/schematic/generator/restrictions/numericality.rb in schematic-0.7.0
- old
+ new
@@ -1,11 +1,13 @@
+require 'schematic/generator/restrictions/base'
+
module Schematic
module Generator
module Restrictions
class Numericality < Base
def generate(builder)
for_validator ActiveModel::Validations::NumericalityValidator do |validator|
- builder.xs(:pattern, "value" => "\\d+")
+ builder.xs(:pattern, 'value' => '\d+')
end
end
end
end
end