aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/attribute_methods.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2016-09-14 17:57:52 +0900
committerRyuta Kamizono <kamipo@gmail.com>2016-09-14 18:26:32 +0900
commit3464cd5c288323ca115a4929d1e6b435c4afc8d4 (patch)
treead2e1380ede0a1789c7c1a7bffb1f43b465c4105 /activerecord/lib/active_record/attribute_methods.rb
parent92703a9ea5d8b96f30e0b706b801c9185ef14f0e (diff)
downloadrails-3464cd5c288323ca115a4929d1e6b435c4afc8d4.tar.gz
rails-3464cd5c288323ca115a4929d1e6b435c4afc8d4.tar.bz2
rails-3464cd5c288323ca115a4929d1e6b435c4afc8d4.zip
Fix broken comments indentation caused by rubocop auto-correct [ci skip]
All indentation was normalized by rubocop auto-correct at 80e66cc4d90bf8c15d1a5f6e3152e90147f00772. But comments was still kept absolute position. This commit aligns comments with method definitions for consistency.
Diffstat (limited to 'activerecord/lib/active_record/attribute_methods.rb')
-rw-r--r--activerecord/lib/active_record/attribute_methods.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/attribute_methods.rb b/activerecord/lib/active_record/attribute_methods.rb
index ba26a11b39..1ed1deec55 100644
--- a/activerecord/lib/active_record/attribute_methods.rb
+++ b/activerecord/lib/active_record/attribute_methods.rb
@@ -416,8 +416,8 @@ module ActiveRecord
private
- # Returns a Hash of the Arel::Attributes and attribute values that have been
- # typecasted for use in an Arel insert/update method.
+ # Returns a Hash of the Arel::Attributes and attribute values that have been
+ # typecasted for use in an Arel insert/update method.
def arel_attributes_with_values(attribute_names)
attrs = {}
arel_table = self.class.arel_table
@@ -428,15 +428,15 @@ module ActiveRecord
attrs
end
- # Filters the primary keys and readonly attributes from the attribute names.
+ # Filters the primary keys and readonly attributes from the attribute names.
def attributes_for_update(attribute_names)
attribute_names.reject do |name|
readonly_attribute?(name)
end
end
- # Filters out the primary keys, from the attribute names, when the primary
- # key is to be generated (e.g. the id attribute has no value).
+ # Filters out the primary keys, from the attribute names, when the primary
+ # key is to be generated (e.g. the id attribute has no value).
def attributes_for_create(attribute_names)
attribute_names.reject do |name|
pk_attribute?(name) && id.nil?