method

table_name_for

Importance_0
v3.2.13 - Show latest stable - 0 notes - Class: AssociationScope
table_name_for(reflection) 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/association_scope.rb, line 106
      def table_name_for(reflection)
        if reflection == self.reflection
          # 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
Register or log in to add new notes.