diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-08-14 16:01:21 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-14 16:01:21 -0400 |
commit | 09dfabccd1015d89c5503e6c556b87f6a0db5a5a (patch) | |
tree | af1a9680d168d831cc0d6f4f3e3fa72189f56d55 | |
parent | a684d7b4a0714e498ba08cbdfaeea7ee35587aa7 (diff) | |
parent | bdae5b5d61af0b7b38c4748f0bae748a34e0612e (diff) | |
download | rails-09dfabccd1015d89c5503e6c556b87f6a0db5a5a.tar.gz rails-09dfabccd1015d89c5503e6c556b87f6a0db5a5a.tar.bz2 rails-09dfabccd1015d89c5503e6c556b87f6a0db5a5a.zip |
Merge pull request #30231 from kamipo/remove_unused_source_type_info
Remove unused `source_type_info` in `RuntimeReflection`
-rw-r--r-- | activerecord/lib/active_record/reflection.rb | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/activerecord/lib/active_record/reflection.rb b/activerecord/lib/active_record/reflection.rb index 3d5c6b8369..7f1601805c 100644 --- a/activerecord/lib/active_record/reflection.rb +++ b/activerecord/lib/active_record/reflection.rb @@ -1077,15 +1077,16 @@ module ActiveRecord @reflection.constraints + [source_type_info] end - def source_type_info - type = @previous_reflection.foreign_type - source_type = @previous_reflection.options[:source_type] - lambda { |object| where(type => source_type) } - end - def get_join_keys(association_klass) @reflection.get_join_keys(association_klass) end + + private + def source_type_info + type = @previous_reflection.foreign_type + source_type = @previous_reflection.options[:source_type] + lambda { |object| where(type => source_type) } + end end class RuntimeReflection < PolymorphicReflection # :nodoc: @@ -1104,10 +1105,6 @@ module ActiveRecord @reflection.constraints end - def source_type_info - @reflection.source_type_info - end - def alias_candidate(name) "#{plural_name}_#{name}_join" end |