Class: Highrise::User

Inherits:
Base
  • Object
show all
Defined in:
lib/highrise/user.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.find_by_name(name) ⇒ Object



3
4
5
# File 'lib/highrise/user.rb', line 3

def self.find_by_name(name)
  find(:all).select{|user| user.name == name}.first
end

Instance Method Details

#join(group) ⇒ Object



7
8
9
# File 'lib/highrise/user.rb', line 7

def join(group)
  Membership.create(:user_id => id, :group_id => group.id)
end