Sha256: 1e41527e9c4b9c7feea6950bef846bff370bf4a6cfac72ba446aab33f57729af

Contents?: true

Size: 782 Bytes

Versions: 4

Compression:

Stored size: 782 Bytes

Contents

# frozen_string_literal: true

class Face < ActiveRecord::Base
  belongs_to :human, inverse_of: :face
  belongs_to :autosave_human, class_name: "Human", foreign_key: :human_id, inverse_of: :autosave_face
  belongs_to :super_human, polymorphic: true
  belongs_to :polymorphic_human, polymorphic: true, inverse_of: :polymorphic_face
  # Oracle identifier length is limited to 30 bytes or less, `polymorphic` renamed `poly`
  belongs_to :poly_human_without_inverse, polymorphic: true
  # These are "broken" inverse_of associations for the purposes of testing
  belongs_to :puzzled_human, class_name: "Human", inverse_of: :puzzled_face
  belongs_to :puzzled_polymorphic_human, polymorphic: true, inverse_of: :puzzled_polymorphic_face

  validate do
    human
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ibm_db-5.5.0-x86-mingw32 test/models/face.rb
ibm_db-5.4.1-x86-mingw32 test/models/face.rb
ibm_db-5.4.0-x86-mingw32 test/models/face.rb
ibm_db-5.3.2-x86-mingw32 test/models/face.rb