module ValidatesTimeliness::ORM::Mongoid
Public Instance Methods
_clear_timeliness_cache()
click to toggle source
# File lib/validates_timeliness/orm/mongoid.rb, line 75 def _clear_timeliness_cache @timeliness_cache = {} end
read_timeliness_attribute_before_type_cast(attr_name)
click to toggle source
# File lib/validates_timeliness/orm/mongoid.rb, line 71 def read_timeliness_attribute_before_type_cast(attr_name) @timeliness_cache && @timeliness_cache[attr_name] || @attributes[attr_name] end
reload(*args)
click to toggle source
Calls superclass method
# File lib/validates_timeliness/orm/mongoid.rb, line 66 def reload(*args) _clear_timeliness_cache super end
write_timeliness_attribute(attr_name, value)
click to toggle source
This is needed in order to mark the attribute as changed; otherwise, mongoid won't save it to the database.
Calls superclass method
# File lib/validates_timeliness/orm/mongoid.rb, line 61 def write_timeliness_attribute(attr_name, value) attribute_will_change!(database_field_name(attr_name)) super end