diff options
-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 |