Skip to content
This repository
Browse code

change AMo::ForbiddenAttributesProtection#sanitize_for_mass_assignmen…

…t to protected
  • Loading branch information...
commit 6783c3f449f9c80268905fe79e444f40d1b2f883 1 parent 1e56f1f
Francesco Rodríguez frodsan authored
15 activemodel/lib/active_model/forbidden_attributes_protection.rb
@@ -14,13 +14,14 @@ module ActiveModel
14 14 class ForbiddenAttributesError < StandardError
15 15 end
16 16
17   - module ForbiddenAttributesProtection
18   - def sanitize_for_mass_assignment(attributes, options = {})
19   - if attributes.respond_to?(:permitted?) && !attributes.permitted?
20   - raise ActiveModel::ForbiddenAttributesError
21   - else
22   - attributes
  17 + module ForbiddenAttributesProtection # :nodoc:
  18 + protected
  19 + def sanitize_for_mass_assignment(attributes, options = {})
  20 + if attributes.respond_to?(:permitted?) && !attributes.permitted?
  21 + raise ActiveModel::ForbiddenAttributesError
  22 + else
  23 + attributes
  24 + end
23 25 end
24   - end
25 26 end
26 27 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.