Sha256: 3096e3a0d52cd7a4ee0a5c322a69802e70c517aaace19fd8024ba8360358db90

Contents?: true

Size: 263 Bytes

Versions: 55

Compression:

Stored size: 263 Bytes

Contents

module ActiveRecord::Associations
  module ForeignAssociation # :nodoc:
    def foreign_key_present?
      if reflection.klass.primary_key
        owner.attribute_present?(reflection.active_record_primary_key)
      else
        false
      end
    end
  end
end

Version data entries

55 entries across 55 versions & 4 rubygems

Version Path
autocompl-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/associations/foreign_association.rb
abaci-0.3.0 vendor/bundle/gems/activerecord-5.0.0/lib/active_record/associations/foreign_association.rb
activerecord-5.0.1 lib/active_record/associations/foreign_association.rb
activerecord-5.0.1.rc2 lib/active_record/associations/foreign_association.rb
activerecord-5.0.1.rc1 lib/active_record/associations/foreign_association.rb
activerecord-5.0.0.1 lib/active_record/associations/foreign_association.rb
activerecord-5.0.0 lib/active_record/associations/foreign_association.rb
activerecord-5.0.0.rc2 lib/active_record/associations/foreign_association.rb
activerecord-5.0.0.racecar1 lib/active_record/associations/foreign_association.rb
activerecord-5.0.0.rc1 lib/active_record/associations/foreign_association.rb
activerecord-5.0.0.beta4 lib/active_record/associations/foreign_association.rb
activerecord-5.0.0.beta3 lib/active_record/associations/foreign_association.rb
activerecord-5.0.0.beta2 lib/active_record/associations/foreign_association.rb
activerecord-5.0.0.beta1.1 lib/active_record/associations/foreign_association.rb
activerecord-5.0.0.beta1 lib/active_record/associations/foreign_association.rb