Permalink
Browse files

Merge pull request #9 from bigbangtechnology/terminating-agency-learn…

…ers-20

Added user find
  • Loading branch information...
2 parents 4ff8134 + 17496f7 commit 755095a6d2129197bf69c3569e9b1512e4c534de Paul Kalupnieks committed Apr 4, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/woopy/account.rb
View
@@ -19,6 +19,12 @@ def employments
end
end
+ def find_user(user_id)
+ user_json = Account.get("#{self.id}/users/#{user_id}")
+
+ User.new(user_json, true)
+ end
+
def find_employment(user)
employment_json = Account.get("#{self.id}/users/#{user.id}/employment")
@@ -31,7 +37,7 @@ def grant_role(user, roles)
end
private
-
+
def create_employment(json)
Employment.new(json, true)
end

0 comments on commit 755095a

Please sign in to comment.