Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

change AMo::ForbiddenAttributesProtection#sanitize_for_mass_assignmen…

…t to protected
  • Loading branch information...
commit 6783c3f449f9c80268905fe79e444f40d1b2f883 1 parent 1e56f1f
Francesco Rodríguez frodsan authored
Showing with 8 additions and 7 deletions.
  1. +8 −7 activemodel/lib/active_model/forbidden_attributes_protection.rb
15 activemodel/lib/active_model/forbidden_attributes_protection.rb
View
@@ -14,13 +14,14 @@ module ActiveModel
class ForbiddenAttributesError < StandardError
end
- module ForbiddenAttributesProtection
- def sanitize_for_mass_assignment(attributes, options = {})
- if attributes.respond_to?(:permitted?) && !attributes.permitted?
- raise ActiveModel::ForbiddenAttributesError
- else
- attributes
+ module ForbiddenAttributesProtection # :nodoc:
+ protected
+ def sanitize_for_mass_assignment(attributes, options = {})
+ if attributes.respond_to?(:permitted?) && !attributes.permitted?
+ raise ActiveModel::ForbiddenAttributesError
+ else
+ attributes
+ end
end
- end
end
end

1 comment on commit 6783c3f

Aaron Patterson
Owner

Why are we changing this to protected and not private?

Please sign in to comment.
Something went wrong with that request. Please try again.