method
find_target
find_target()
private
Hide source
# File activerecord/lib/active_record/associations/belongs_to_association.rb, line 45 def find_target find_method = if @reflection.options[:primary_key] "find_by_#{@reflection.options[:primary_key]}" else "find" end the_target = @reflection.klass.send(find_method, @owner[@reflection.primary_key_name], :select => @reflection.options[:select], :conditions => conditions, :include => @reflection.options[:include], :readonly => @reflection.options[:readonly] ) if @owner[@reflection.primary_key_name] set_inverse_instance(the_target, @owner) the_target end