lib/schematic/generator/restrictions/base.rb in schematic-0.1.9 vs lib/schematic/generator/restrictions/base.rb in schematic-0.2.1
- old
+ new
@@ -8,10 +8,10 @@
end
def for_validator(validator_klass)
validators_for_column.each do |column_validation|
next unless column_validation.is_a? validator_klass
- next unless column_validation.options[:if].nil?
+ next unless column_validation.options[:if].nil? || column_validation.options[:unless].nil?
yield(column_validation)
return
end
end