module JamRuby
  class Genre < ActiveRecord::Base

    self.primary_key = 'id'

    # bands
    has_and_belongs_to_many :bands, :class_name => "JamRuby::Band", :join_table => "bands_genres"

    # genres
    has_and_belongs_to_many :recordings, :class_name => "JamRuby::Recording", :join_table => "recordings_genres"

    # music sessions
    has_and_belongs_to_many :music_sessions, :class_name => "JamRuby::MusicSession", :join_table => "genres_music_sessions"

  end
end