jam-cloud/lib/jam_ruby/models/jam_session.rb

15 lines
350 B
Ruby

module JamRuby
class JamSession < ActiveRecord::Base
belongs_to :user, :inverse_of => :jam_sessions
has_many :jam_session_members
has_many :users, :through => :jam_session_members
# Verifies that the specified user can join this jam session
def access?(user)
return self.users.exists? user
end
end
end