def attributes=(new_attributes, guard_protected_attributes = nil)
unless guard_protected_attributes.nil?
message = "the use of 'guard_protected_attributes' will be removed from the next minor release of rails, " +
"if you want to bypass mass-assignment security then look into using assign_attributes"
ActiveSupport::Deprecation.warn(message)
end
return unless new_attributes.is_a?(Hash)
if guard_protected_attributes == false
assign_attributes(new_attributes, :without_protection => true)
else
assign_attributes(new_attributes)
end
end