aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/attribute_methods/write.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2016-08-23 10:24:08 +0900
committerRyuta Kamizono <kamipo@gmail.com>2016-09-03 13:28:46 +0900
commit7c70430ce063af501154591f114dfc02e559f774 (patch)
tree8cd1d61de778ce17e06db8687278f01099b91e1b /activerecord/lib/active_record/attribute_methods/write.rb
parentf2f00ca54a83e86ef845ec9fb3e9e373d367550f (diff)
downloadrails-7c70430ce063af501154591f114dfc02e559f774.tar.gz
rails-7c70430ce063af501154591f114dfc02e559f774.tar.bz2
rails-7c70430ce063af501154591f114dfc02e559f774.zip
Fix broken heredoc indentation caused by rubocop auto-correct
All indentation was normalized by rubocop auto-correct at 80e66cc4d90bf8c15d1a5f6e3152e90147f00772. But heredocs was still kept absolute position. This commit aligns heredocs indentation for consistency.
Diffstat (limited to 'activerecord/lib/active_record/attribute_methods/write.rb')
-rw-r--r--activerecord/lib/active_record/attribute_methods/write.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/write.rb b/activerecord/lib/active_record/attribute_methods/write.rb
index 5822414129..e9d044ef13 100644
--- a/activerecord/lib/active_record/attribute_methods/write.rb
+++ b/activerecord/lib/active_record/attribute_methods/write.rb
@@ -15,13 +15,13 @@ module ActiveRecord
ActiveRecord::AttributeMethods::AttrNames.set_name_cache safe_name, name
generated_attribute_methods.module_eval <<-STR, __FILE__, __LINE__ + 1
- def __temp__#{safe_name}=(value)
- name = ::ActiveRecord::AttributeMethods::AttrNames::ATTR_#{safe_name}
- write_attribute(name, value)
- end
- alias_method #{(name + '=').inspect}, :__temp__#{safe_name}=
- undef_method :__temp__#{safe_name}=
- STR
+ def __temp__#{safe_name}=(value)
+ name = ::ActiveRecord::AttributeMethods::AttrNames::ATTR_#{safe_name}
+ write_attribute(name, value)
+ end
+ alias_method #{(name + '=').inspect}, :__temp__#{safe_name}=
+ undef_method :__temp__#{safe_name}=
+ STR
end
end