module JamRuby
  class BandMusician < ActiveRecord::Base

    self.table_name = "bands_musicians"

    attr_accessible :band_id, :user_id, :admin

    self.primary_key = 'id'

    belongs_to :user
    belongs_to :band

    # name, genres, photo_url, and logo_url are needed here for the RABL file
    def name
      @name = self.band.name
    end

    def genres
      @genres = self.band.genres
    end

    def photo_url
      @photo_url = self.band.photo_url
    end

    def logo_url
      @logo_url = self.band.logo_url
    end

  end
end