Class: Membership
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Membership
- Defined in:
- app/models/membership.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.admin ⇒ Object
11 12 13 |
# File 'app/models/membership.rb', line 11 def self.admin where(:admin => true) end |
.by_name ⇒ Object
23 24 25 |
# File 'app/models/membership.rb', line 23 def self.by_name joins(:user).order('users.name') end |
Instance Method Details
#email ⇒ Object
19 20 21 |
# File 'app/models/membership.rb', line 19 def email user.email end |
#name ⇒ Object
15 16 17 |
# File 'app/models/membership.rb', line 15 def name user.name end |