lib/mongomodel/concerns/attribute_methods/protected.rb in mongomodel-0.5.5 vs lib/mongomodel/concerns/attribute_methods/protected.rb in mongomodel-0.5.6

- old
+ new

@@ -1,22 +1,22 @@ module MongoModel module AttributeMethods module Protected extend ActiveSupport::Concern - + include ActiveModel::MassAssignmentSecurity module ClassMethods def property(name, *args, &block)#:nodoc: property = super(name, *args, &block) attr_protected(name) if property.options[:protected] attr_accessible(name) if property.options[:accessible] - + property end end - + def assign_attributes(attrs, options={}) if options[:without_protection] super else super(sanitize_for_mass_assignment(attrs, options[:as] || :default))