Flowdock
method

joined_tables

Importance_0
v2.3.2 - Show latest stable - 0 notes - Class: ActiveRecord::Associations::ClassMethods
joined_tables(options) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/associations.rb, line 1672
        def joined_tables(options)
          scope = scope(:find)
          joins = options[:joins]
          merged_joins = scope && scope[:joins] && joins ? merge_joins(scope[:joins], joins) : (joins || scope && scope[:joins])
          [table_name] + case merged_joins
          when Symbol, Hash, Array
            if array_of_strings?(merged_joins)
              tables_in_string(merged_joins.join(' '))
            else
              join_dependency = ActiveRecord::Associations::ClassMethods::InnerJoinDependency.new(self, merged_joins, nil)
              join_dependency.join_associations.collect {|join_association| [join_association.aliased_join_table_name, join_association.aliased_table_name]}.flatten.compact
            end
          else
            tables_in_string(merged_joins)
          end
        end
Register or log in to add new notes.