Sha256: 2efbc4b54fa44d32e75ef6c61ab7dee2d61430b4172f3d82068a99e8f01ea958
Contents?: true
Size: 702 Bytes
Versions: 4
Compression:
Stored size: 702 Bytes
Contents
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)) end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems