Sha256: 36b63c44b96ab32ea861e7f0f8e7cb54211bd1b310f82de58b1a32490880afd4

Contents?: true

Size: 429 Bytes

Versions: 4

Compression:

Stored size: 429 Bytes

Contents

# frozen_string_literal: true

class Tag < ActiveRecord::Base
  if ENV['AR_VERSION'].to_f <= 7.0
    self.primary_keys = :tag_id, :publisher_id unless ENV["SKIP_COMPOSITE_PK"]
  else
    self.primary_key = [:tag_id, :publisher_id] unless ENV["SKIP_COMPOSITE_PK"]
  end
  self.primary_key = [:tag_id, :publisher_id] unless ENV["SKIP_COMPOSITE_PK"]
  has_many :books, inverse_of: :tag
  has_many :tag_aliases, inverse_of: :tag
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
activerecord-import-2.1.0 test/models/tag.rb
activerecord-import-2.0.0 test/models/tag.rb
activerecord-import-1.8.1 test/models/tag.rb
activerecord-import-1.8.0 test/models/tag.rb