method

find_target

Importance_0
v2.1.0 - Show latest stable - 0 notes - Class: ActiveRecord::Associations::BelongsToPolymorphicAssociation
find_target() 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/belongs_to_polymorphic_association.rb, line 25
        def find_target
          return nil if association_class.nil?

          if @reflection.options[:conditions]
            association_class.find(
              @owner[@reflection.primary_key_name],
              :select     => @reflection.options[:select],
              :conditions => conditions,
              :include    => @reflection.options[:include]
            )
          else
            association_class.find(@owner[@reflection.primary_key_name], :select => @reflection.options[:select], :include => @reflection.options[:include])
          end
        end
Register or log in to add new notes.