mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-22 22:06:45 +00:00
Merge pull request #154 from yxf/master
Fixed version checking of ActiveModel
This commit is contained in:
commit
9dd2e87087
@ -56,7 +56,7 @@ module ValidatesTimeliness
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Rails 4.0 compatibility for old #setup method with class as arg
|
# Rails 4.0 compatibility for old #setup method with class as arg
|
||||||
if ActiveModel.version <= Gem::Version.new('4.1')
|
if Gem::Version.new(ActiveModel::VERSION::STRING) <= Gem::Version.new('4.1')
|
||||||
alias_method(:setup, :setup_timeliness_validated_attributes)
|
alias_method(:setup, :setup_timeliness_validated_attributes)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user