module MongoidRails::ForbiddenAttributesProtection

Public Instance Methods

sanitize_for_mass_assignment(attributes) click to toggle source
# File lib/mongoid-rails/forbidden_attributes_protection.rb, line 4
def sanitize_for_mass_assignment(attributes)
  if MongoidRails.should_permit?(attributes)
    attributes
  else
    raise ActiveModel::ForbiddenAttributesError
  end
end
sanitize_forbidden_attributes(attributes)