method
find_target
v2.1.0 -
Show latest stable
-
0 notes -
Class: ActiveRecord::Associations::BelongsToPolymorphicAssociation
find_target()
private
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