diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2016-12-25 02:46:12 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2016-12-25 02:46:12 +0900 |
commit | 57290e63630ce0300e6fea28c1854339e9455a41 (patch) | |
tree | 1a064766811823f7a0f2367572cb9bf8ac31a474 /activerecord/lib/active_record/attribute.rb | |
parent | a4c640ac143786fa945be312f8db3f2827f649f0 (diff) | |
download | rails-57290e63630ce0300e6fea28c1854339e9455a41.tar.gz rails-57290e63630ce0300e6fea28c1854339e9455a41.tar.bz2 rails-57290e63630ce0300e6fea28c1854339e9455a41.zip |
No need `:doc:` for `:nodoc:` classes [ci skip]
Follow up to 5b14129d8d4ad302b4e11df6bd5c7891b75f393c.
http://edgeapi.rubyonrails.org/classes/ActiveRecord/Attribute.html
Diffstat (limited to 'activerecord/lib/active_record/attribute.rb')
-rw-r--r-- | activerecord/lib/active_record/attribute.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/attribute.rb b/activerecord/lib/active_record/attribute.rb index 2a8e8f9de4..38281158d8 100644 --- a/activerecord/lib/active_record/attribute.rb +++ b/activerecord/lib/active_record/attribute.rb @@ -135,7 +135,7 @@ module ActiveRecord attr_reader :original_attribute alias_method :assigned?, :original_attribute - def original_value_for_database # :doc: + def original_value_for_database if assigned? original_attribute.original_value_for_database else @@ -144,17 +144,17 @@ module ActiveRecord end private - def initialize_dup(other) # :doc: + def initialize_dup(other) if defined?(@value) && @value.duplicable? @value = @value.dup end end - def changed_from_assignment? # :doc: + def changed_from_assignment? assigned? && type.changed?(original_value, value, value_before_type_cast) end - def _original_value_for_database # :doc: + def _original_value_for_database type.serialize(original_value) end |