Class: Membership

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/membership.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.adminObject



11
12
13
# File 'app/models/membership.rb', line 11

def self.admin
  where(:admin => true)
end

.by_nameObject



23
24
25
# File 'app/models/membership.rb', line 23

def self.by_name
  joins(:user).order('users.name')
end

Instance Method Details

#emailObject



19
20
21
# File 'app/models/membership.rb', line 19

def email
  user.email
end

#nameObject



15
16
17
# File 'app/models/membership.rb', line 15

def name
  user.name
end