lib/schematic/generator/restrictions/pattern.rb in schematic-0.1.3 vs lib/schematic/generator/restrictions/pattern.rb in schematic-0.1.4

- old
+ new

@@ -1,13 +1,8 @@ module Schematic module Generator module Restrictions class Pattern < Base - def initialize(klass, column) - @klass = klass - @column = column - end - def generate(builder) for_validator ActiveModel::Validations::FormatValidator do |validator| if pattern = validator.options[:with] value = pattern.source value.gsub!(/^(?:\^|\\A|\\a)?/, '')