module ActiveMusicbrainz::Model::Base::ClassMethods

Public Instance Methods

has_artist_credits() click to toggle source
# File lib/active_musicbrainz/models/base.rb, line 9
def has_artist_credits
  belongs_to  :artist_credit, foreign_key: :artist_credit
  has_many    :artist_credit_names, through: :artist_credit
  has_many    :artists, through: :artist_credit_names
end
has_gid() click to toggle source
# File lib/active_musicbrainz/models/base.rb, line 15
def has_gid
  define_singleton_method :by_gid do |gid|
    find_by gid: gid
  end
end