Permalink
Browse files

change AMo::ForbiddenAttributesProtection#sanitize_for_mass_assignmen…

…t to protected
  • Loading branch information...
1 parent 1e56f1f commit 6783c3f449f9c80268905fe79e444f40d1b2f883 Francesco Rodriguez committed Sep 20, 2012
Showing with 8 additions and 7 deletions.
  1. +8 −7 activemodel/lib/active_model/forbidden_attributes_protection.rb
View
15 activemodel/lib/active_model/forbidden_attributes_protection.rb
@@ -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

@tenderlove
Ruby on Rails member

Why are we changing this to protected and not private?

Please sign in to comment.