Sha256: 31ab34d85bf263856f72b0c0816e20537e6987bf2b4c5e6296dd394017e4b6cd

Contents?: true

Size: 320 Bytes

Versions: 2

Compression:

Stored size: 320 Bytes

Contents

# frozen_string_literal: true

class Author < ActiveRecord::Base
  if ENV['AR_VERSION'].to_f >= 8.0
    has_many :composite_books, foreign_key: [:id, :author_id], inverse_of: :author
  elsif ENV['AR_VERSION'].to_f >= 7.1
    has_many :composite_books, query_constraints: [:id, :author_id], inverse_of: :author
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
activerecord-import-2.1.0 test/models/author.rb
activerecord-import-2.0.0 test/models/author.rb