lib/custom_fields/target.rb in custom_fields-2.0.0.rc1 vs lib/custom_fields/target.rb in custom_fields-2.0.0.rc2
- old
+ new
@@ -14,14 +14,10 @@
## fields ##
field :custom_fields_recipe, :type => Hash
end
- module InstanceMethods
-
- end
-
module ClassMethods
# A document with custom fields always returns true.
#
# @return [ Boolean ] True
@@ -43,10 +39,10 @@
klass.cattr_accessor :version
klass.version = recipe['version']
# copy scopes from the parent class (scopes does not inherit automatically from the parents in mongoid)
- klass.write_inheritable_attribute(:scopes, self.scopes)
+ # klass.write_inheritable_attribute(:scopes, self.scopes) # not needed it
recipe['rules'].each do |rule|
self.send(:"apply_#{rule['type']}_custom_field", klass, rule)
end
end
\ No newline at end of file