method
table_name_for
v4.1.8 -
Show latest stable
- Class:
ActiveRecord::Associations::AssociationScope
table_name_for(reflection, klass, refl)private
No documentation available.
# File activerecord/lib/active_record/associations/association_scope.rb, line 134
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