mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-23 06:16:44 +00:00
Move active model methods into active model ORM module to be included manually if not using AR or other ORM
21 lines
402 B
Ruby
21 lines
402 B
Ruby
module ValidatesTimeliness
|
|
module ORM
|
|
module ActiveModel
|
|
extend ActiveSupport::Concern
|
|
|
|
module ClassMethods
|
|
public
|
|
|
|
def define_attribute_methods(*attr_names)
|
|
super.tap { define_timeliness_methods}
|
|
end
|
|
|
|
def undefine_attribute_methods
|
|
super.tap { undefine_timeliness_attribute_methods }
|
|
end
|
|
end
|
|
|
|
end
|
|
end
|
|
end
|