From 6783c3f449f9c80268905fe79e444f40d1b2f883 Mon Sep 17 00:00:00 2001
From: Francesco Rodriguez <lrodriguezsanc@gmail.com>
Date: Thu, 20 Sep 2012 12:14:29 -0500
Subject: change
 AMo::ForbiddenAttributesProtection#sanitize_for_mass_assignment to protected

---
 .../lib/active_model/forbidden_attributes_protection.rb   | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

(limited to 'activemodel/lib')

diff --git a/activemodel/lib/active_model/forbidden_attributes_protection.rb b/activemodel/lib/active_model/forbidden_attributes_protection.rb
index f4c5d536eb..4c05b19cba 100644
--- a/activemodel/lib/active_model/forbidden_attributes_protection.rb
+++ b/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
-- 
cgit v1.2.3