mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-25 07:16:41 +00:00
The ActiveRecord extension now returns the original return value for .define_attribute_methods
This helps other extensions, like PermalinkFu, which depend on the return value
This commit is contained in:
committed by
Adam Meehan
parent
20549c7acd
commit
2702ec3266
@@ -18,9 +18,10 @@ module ValidatesTimeliness
|
||||
|
||||
module ClassMethods
|
||||
def define_attribute_methods
|
||||
super
|
||||
use_before_type_cast = ValidatesTimeliness::ORM::ActiveRecord.use_plugin_cache?
|
||||
define_timeliness_methods use_before_type_cast
|
||||
super.tap do |attribute_methods_generated|
|
||||
use_before_type_cast = ValidatesTimeliness::ORM::ActiveRecord.use_plugin_cache?
|
||||
define_timeliness_methods use_before_type_cast
|
||||
end
|
||||
end
|
||||
|
||||
def define_timeliness_methods(before_type_cast=false)
|
||||
|
||||
Reference in New Issue
Block a user