iugusdk 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
@@ -1,3 +1,3 @@
1
1
  module IuguSDK
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
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.3
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-07 00:00:00.000000000 Z
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: -2198739510891912385
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: -2198739510891912385
952
+ hash: 350128318697639413
953
953
  requirements: []
954
954
  rubyforge_project:
955
955
  rubygems_version: 1.8.24