diff options
author | Akira Matsuda <ronnie@dio.jp> | 2016-12-25 03:38:30 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-25 03:38:30 +0900 |
commit | 5b874cf42a41b966ca223a278b77fd0b4144ddb6 (patch) | |
tree | b72e770a8e86596ff18f74bdbaa5805c1ccae21e /activerecord/lib/active_record | |
parent | e8ba0c0f21e2660b90f872fa4595156ca6190c77 (diff) | |
parent | 57290e63630ce0300e6fea28c1854339e9455a41 (diff) | |
download | rails-5b874cf42a41b966ca223a278b77fd0b4144ddb6.tar.gz rails-5b874cf42a41b966ca223a278b77fd0b4144ddb6.tar.bz2 rails-5b874cf42a41b966ca223a278b77fd0b4144ddb6.zip |
Merge pull request #27448 from kamipo/no_need_doc_for_nodoc_classes
No need `:doc:` for `:nodoc:` classes [ci skip]
Diffstat (limited to 'activerecord/lib/active_record')
3 files changed, 7 insertions, 7 deletions
diff --git a/activerecord/lib/active_record/associations/through_association.rb b/activerecord/lib/active_record/associations/through_association.rb index 07e7bf1a89..6b87993ba3 100644 --- a/activerecord/lib/active_record/associations/through_association.rb +++ b/activerecord/lib/active_record/associations/through_association.rb @@ -10,7 +10,7 @@ module ActiveRecord # # 1. To get the default_scope conditions for any of the other reflections in the chain # 2. To get the type conditions for any STI models in the chain - def target_scope # :doc: + def target_scope scope = super reflection.chain.drop(1).each do |reflection| relation = reflection.klass.all 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 diff --git a/activerecord/lib/active_record/validations/uniqueness.rb b/activerecord/lib/active_record/validations/uniqueness.rb index 453d7079ac..9e8edfbfaf 100644 --- a/activerecord/lib/active_record/validations/uniqueness.rb +++ b/activerecord/lib/active_record/validations/uniqueness.rb @@ -83,7 +83,7 @@ module ActiveRecord end end - def scope_relation(record, relation) # :doc: + def scope_relation(record, relation) Array(options[:scope]).each do |scope_item| scope_value = if record.class._reflect_on_association(scope_item) record.association(scope_item).reader @@ -96,7 +96,7 @@ module ActiveRecord relation end - def map_enum_attribute(klass, attribute, value) # :doc: + def map_enum_attribute(klass, attribute, value) mapping = klass.defined_enums[attribute.to_s] value = mapping[value] if value && mapping value |