iugusdk 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/app/models/account.rb +3 -2
- data/lib/iugusdk/version.rb +1 -1
- metadata +4 -4
data/app/models/account.rb
CHANGED
@@ -99,10 +99,11 @@ class Account < ActiveRecord::Base
|
|
99
99
|
end
|
100
100
|
|
101
101
|
def transfer_ownership(user)
|
102
|
+
old_owner = owner_account_user
|
102
103
|
au = account_users.find_by_user_id user.id
|
104
|
+
return unless au
|
103
105
|
au.set_owner
|
104
|
-
|
105
|
-
owner_account_user.roles.find_by_name("owner").try :destroy if owner_account_user
|
106
|
+
old_owner.roles.find_by_name("owner").try :destroy if old_owner
|
106
107
|
|
107
108
|
if au.is? :owner
|
108
109
|
subscription = Iugu::Api::Subscription.find subscription_id.to_s.to_uuid.to_s
|
data/lib/iugusdk/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iugusdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2013-10-
|
14
|
+
date: 2013-10-18 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
@@ -940,7 +940,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
940
940
|
version: '0'
|
941
941
|
segments:
|
942
942
|
- 0
|
943
|
-
hash:
|
943
|
+
hash: 350128318697639413
|
944
944
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
945
945
|
none: false
|
946
946
|
requirements:
|
@@ -949,7 +949,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
949
949
|
version: '0'
|
950
950
|
segments:
|
951
951
|
- 0
|
952
|
-
hash:
|
952
|
+
hash: 350128318697639413
|
953
953
|
requirements: []
|
954
954
|
rubyforge_project:
|
955
955
|
rubygems_version: 1.8.24
|