Sha256: feecd51e51ac40ea8a01411634b6db8304d0a488a73e80b6517ad3e2767bbfa5
Contents?: true
Size: 558 Bytes
Versions: 15
Compression:
Stored size: 558 Bytes
Contents
# frozen_string_literal: true class User < ActiveRecord::Base has_secure_password has_many :memberships, inverse_of: :user, dependent: :destroy, class_name: '::Account::Member' has_many :accounts, through: :memberships, inverse_of: :users where_ownership = -> { where(account_members: { role: :owner }) } has_one :ownership, where_ownership, inverse_of: :user, class_name: '::Account::Member' has_one :account, through: :ownership, inverse_of: :owner has_one :token, inverse_of: :user, dependent: :destroy, class_name: '::User::Token' end
Version data entries
15 entries across 8 versions & 3 rubygems