Sha256: 8181c341dee2101e667103d1c374ff7e9499f41bb2d9d0a7c91f57b802de590a

Contents?: true

Size: 489 Bytes

Versions: 6

Compression:

Stored size: 489 Bytes

Contents

# frozen_string_literal: true

class Organization < ActiveRecord::Base
  has_many :member_details
  has_many :members, through: :member_details

  has_many :authors, primary_key: :name
  has_many :author_essay_categories, through: :authors, source: :essay_categories

  has_one :author, primary_key: :name
  has_one :author_owned_essay_category, through: :author, source: :owned_essay_category

  has_many :posts, through: :author, source: :posts

  scope :clubs, -> { from("clubs") }
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
ibm_db-5.5.0 test/models/organization.rb
ibm_db-5.4.1 test/models/organization.rb
ibm_db-5.4.0 test/models/organization.rb
ibm_db-5.3.2 test/models/organization.rb
ibm_db-5.3.1 test/models/organization.rb
ruby-on-quails-0.1.0 activerecord/test/models/organization.rb