aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/attribute_methods
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/attribute_methods')
-rw-r--r--activerecord/lib/active_record/attribute_methods/primary_key.rb4
-rw-r--r--activerecord/lib/active_record/attribute_methods/read.rb4
-rw-r--r--activerecord/lib/active_record/attribute_methods/write.rb4
3 files changed, 6 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/primary_key.rb b/activerecord/lib/active_record/attribute_methods/primary_key.rb
index 287367f92a..ffb83a972c 100644
--- a/activerecord/lib/active_record/attribute_methods/primary_key.rb
+++ b/activerecord/lib/active_record/attribute_methods/primary_key.rb
@@ -50,9 +50,9 @@ module ActiveRecord
attribute_in_database(self.class.primary_key)
end
- protected
+ private
- def attribute_method?(attr_name)
+ def attribute_method?(attr_name) # :doc:
attr_name == "id" || super
end
diff --git a/activerecord/lib/active_record/attribute_methods/read.rb b/activerecord/lib/active_record/attribute_methods/read.rb
index 5448ebc165..727b4288e9 100644
--- a/activerecord/lib/active_record/attribute_methods/read.rb
+++ b/activerecord/lib/active_record/attribute_methods/read.rb
@@ -4,7 +4,7 @@ module ActiveRecord
extend ActiveSupport::Concern
module ClassMethods
- protected
+ private
# We want to generate the methods via module_eval rather than
# define_method, because define_method is slower on dispatch.
@@ -24,7 +24,7 @@ module ActiveRecord
# to allocate an object on each call to the attribute method.
# Making it frozen means that it doesn't get duped when used to
# key the @attributes in read_attribute.
- def define_method_attribute(name)
+ def define_method_attribute(name) # :doc:
safe_name = name.unpack("h*".freeze).first
temp_method = "__temp__#{safe_name}"
diff --git a/activerecord/lib/active_record/attribute_methods/write.rb b/activerecord/lib/active_record/attribute_methods/write.rb
index 0022d526a4..a80ee74f47 100644
--- a/activerecord/lib/active_record/attribute_methods/write.rb
+++ b/activerecord/lib/active_record/attribute_methods/write.rb
@@ -8,9 +8,9 @@ module ActiveRecord
end
module ClassMethods
- protected
+ private
- def define_method_attribute=(name)
+ def define_method_attribute=(name) # :doc:
safe_name = name.unpack("h*".freeze).first
ActiveRecord::AttributeMethods::AttrNames.set_name_cache safe_name, name