Sha256: a94174fb02d56c6772b933c44e30038980a112ada7b3cfb66329923436351b07
Contents?: true
Size: 483 Bytes
Versions: 6
Compression:
Stored size: 483 Bytes
Contents
# Copyright 2021 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 Track < ActiveRecord::Base belongs_to :album, foreign_key: "albumid" belongs_to :singer, foreign_key: "singerid", counter_cache: true def initialize attributes = nil super self.singer ||= self.album&.singer end def album=value super self.singer = value&.singer end end
Version data entries
6 entries across 6 versions & 1 rubygems