accounts_client 0.0.20 → 0.0.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/app/models/padma_account.rb +6 -2
  2. metadata +2 -2
@@ -24,11 +24,15 @@ class PadmaAccount < LogicalModel
24
24
  end
25
25
 
26
26
  def users
27
- PadmaUser.paginate :params => { :account_name => self.name }
27
+ PadmaUser.paginate(:account_name => self.name)
28
+ end
29
+
30
+ def admin
31
+ self.users.select {|u| u.roles.select {|r| r["name"] == "admin"}.first}.first
28
32
  end
29
33
 
30
34
  def contacts
31
- PadmaContact.paginate :params => { :account_name => self.name }
35
+ PadmaContact.paginate(:account_name => self.name)
32
36
  end
33
37
 
34
38
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: accounts_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.20
4
+ version: 0.0.21
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-09-28 00:00:00.000000000 Z
12
+ date: 2014-01-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties