method
target_id
v3.1.0 -
Show latest stable
- Class:
ActiveRecord::Associations::BelongsToAssociation
target_id()private
No documentation available.
# File activerecord/lib/active_record/associations/belongs_to_association.rb, line 58
def target_id
if options[:primary_key]
owner.send(reflection.name).try(:id)
else
owner[reflection.foreign_key]
end
end