Flowdock
method

association_klass

Importance_0
Ruby on Rails latest stable (v4.1.8) - 0 notes - Class: Preloader

Method deprecated or moved

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

association_klass(reflection, record) 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/preloader.rb, line 156
      def association_klass(reflection, record)
        if reflection.macro == :belongs_to && reflection.options[:polymorphic]
          klass = record.send(reflection.foreign_type)
          klass && klass.constantize
        else
          reflection.klass
        end
      end
Register or log in to add new notes.