lib/mongomodel/support/map.rb in mongomodel-0.3.3 vs lib/mongomodel/support/map.rb in mongomodel-0.3.4
- old
+ new
@@ -1,5 +1,7 @@
+require 'active_support/core_ext/class/attribute'
+
module MongoModel
class Map < Hash
module PropertyDefaults
def property(name, *args, &block) #:nodoc:
property = super(name, *args, &block)
@@ -10,13 +12,13 @@
property
end
end
- class_inheritable_accessor :from
+ class_attribute :from
self.from = String
- class_inheritable_accessor :to
+ class_attribute :to
self.to = Object
HASH_CONVERTER = Types.converter_for(Hash)
class << self