method

association_for_table

rails latest stable - Class: ActiveRecord::QueryMethods

Method deprecated or moved

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

association_for_table(table_name)
private

No documentation available.

# File activerecord/lib/active_record/relation/query_methods.rb, line 1011
    def association_for_table(table_name)
      table_name = table_name.to_s
      @klass._reflect_on_association(table_name) ||
        @klass._reflect_on_association(table_name.singularize)
    end