method
find_target
v3.0.9 -
Show latest stable
- Class:
ActiveRecord::Associations::HasOneAssociation
find_target()private
No documentation available.
# File activerecord/lib/active_record/associations/has_one_association.rb, line 81
def find_target
options = @reflection.options.dup
(options.keys - [:select, :order, :include, :readonly]).each do |key|
options.delete key
end
options[:conditions] = @finder_sql
the_target = @reflection.klass.find(:first, options)
set_inverse_instance(the_target, @owner)
the_target
end