Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Can use simple Mongoid inclusion now that fixed Concern usage is rele…

…ased (a while ago)
  • Loading branch information...
commit 9a99c473230711e51b95fa29df156a2f32da9b91 1 parent fbc2867
@adzap adzap authored
Showing with 2 additions and 12 deletions.
  1. +2 −12 lib/validates_timeliness/orm/mongoid.rb
View
14 lib/validates_timeliness/orm/mongoid.rb
@@ -36,18 +36,8 @@ def timeliness_attribute_type(attr_name)
end
module Mongoid::Document
- # Due to how Mongoid misuses ActiveSupport::Concern,
- # the only way to override a core component method is
- # using an append_features hook.
- #
- module TimelinessConcern
- def append_features(base)
- super
- base.send :include, ValidatesTimeliness::AttributeMethods
- base.send :include, ValidatesTimeliness::ORM::Mongoid
- end
- end
- extend TimelinessConcern
+ include ValidatesTimeliness::AttributeMethods
+ include ValidatesTimeliness::ORM::Mongoid
def reload_with_timeliness
_clear_timeliness_cache
Please sign in to comment.
Something went wrong with that request. Please try again.