lib/weak_parameters/validator.rb in weak_parameters-0.0.2 vs lib/weak_parameters/validator.rb in weak_parameters-0.0.3
- old
+ new
@@ -13,17 +13,13 @@
def validators
@validators ||= []
end
- def type
- self.class.name.split("::").last.sub(/Validator$/, "").underscore.to_sym
- end
-
private
def string(key, options = {})
- validators << WeakParameters::BaseValidator.new(params, key, options)
+ validators << WeakParameters::StringValidator.new(params, key, options)
end
def integer(key, options = {})
validators << WeakParameters::IntegerValidator.new(params, key, options)
end