method

table_name_for

rails latest stable - Class: ActiveRecord::Associations::AssociationScope

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v4.2.9) is shown here.

table_name_for(reflection, klass, refl)
private

No documentation available.

# File activerecord/lib/active_record/associations/association_scope.rb, line 179
      def table_name_for(reflection, klass, refl)
        if reflection == refl
          # If this is a polymorphic belongs_to, we want to get the klass from the
          # association because it depends on the polymorphic_type attribute of
          # the owner
          klass.table_name
        else
          reflection.table_name
        end
      end