Sha256: 48e81bae169cfe8a285fc32ac100f50437dbf10360b9bfe82f70108f6e7734c1

Contents?: true

Size: 423 Bytes

Versions: 21

Compression:

Stored size: 423 Bytes

Contents

# Copyright 2020 Google LLC
#
# Use of this source code is governed by an MIT-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT.

class Member < ActiveRecord::Base
  has_one :membership
  has_one :club, through: :membership
  has_one :favourite_club, -> { where "memberships.favourite = ?", true },
          through: :membership, source: :club
  belongs_to :member_type
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
activerecord-spanner-adapter-1.6.3 acceptance/models/member.rb
activerecord-spanner-adapter-1.6.2 acceptance/models/member.rb
activerecord-spanner-adapter-1.6.1 acceptance/models/member.rb
activerecord-spanner-adapter-1.6.0 acceptance/models/member.rb
activerecord-spanner-adapter-1.5.1 acceptance/models/member.rb
activerecord-spanner-adapter-1.5.0 acceptance/models/member.rb
activerecord-spanner-adapter-1.4.4 acceptance/models/member.rb
activerecord-spanner-adapter-1.4.3 acceptance/models/member.rb
activerecord-spanner-adapter-1.4.2 acceptance/models/member.rb
activerecord-spanner-adapter-1.4.1 acceptance/models/member.rb
activerecord-spanner-adapter-1.4.0 acceptance/models/member.rb
activerecord-spanner-adapter-1.3.1 acceptance/models/member.rb
activerecord-spanner-adapter-1.2.2 acceptance/models/member.rb
activerecord-spanner-adapter-1.2.1 acceptance/models/member.rb
activerecord-spanner-adapter-1.2.0 acceptance/models/member.rb
activerecord-spanner-adapter-1.1.0 acceptance/models/member.rb
activerecord-spanner-adapter-1.0.1 acceptance/models/member.rb
activerecord-spanner-adapter-1.0.0 acceptance/models/member.rb
activerecord-spanner-adapter-0.7.0 acceptance/models/member.rb
activerecord-spanner-adapter-0.6.0 acceptance/models/member.rb