mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-25 15:22:58 +00:00
use activemodel scoped class name in helper method to remove need for .kind override
This commit is contained in:
@@ -20,7 +20,7 @@ module ActiveModel
|
||||
self.timeliness_validated_attributes ||= []
|
||||
self.timeliness_validated_attributes += (attr_names - self.timeliness_validated_attributes)
|
||||
end
|
||||
validates_with ValidatesTimeliness::Validator, options
|
||||
validates_with TimelinessValidator, options
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -22,10 +22,6 @@ module ValidatesTimeliness
|
||||
|
||||
RESTRICTION_ERROR_MESSAGE = "Error occurred validating %s for %s restriction:\n%s"
|
||||
|
||||
def self.kind
|
||||
:timeliness
|
||||
end
|
||||
|
||||
def initialize(options)
|
||||
@type = options.delete(:type) || :datetime
|
||||
@allow_nil, @allow_blank = options.delete(:allow_nil), options.delete(:allow_blank)
|
||||
|
||||
Reference in New Issue
Block a user