File tree 2 files changed +1
-8
lines changed
2 files changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,6 @@ def unregister_from_stripe
114
114
115
115
#TODO CHANGE with default in rails 4
116
116
def generate_public_id
117
- self . public_id = public_id || SecureRandom . urlsafe_base64 ( 4 ) . downcase
117
+ self . public_id ||= SecureRandom . urlsafe_base64 ( 4 ) . downcase
118
118
end
119
119
end
Original file line number Diff line number Diff line change @@ -21,16 +21,9 @@ class Teams::Account < ActiveRecord::Base
21
21
validates_presence_of :stripe_card_token
22
22
validates_presence_of :stripe_customer_token
23
23
validates :team_id , presence : true , uniqueness : true
24
- validate :admin_id , :payer_is_team_admin
25
24
26
25
attr_protected :stripe_customer_token , :admin_id
27
26
28
- def payer_is_team_admin
29
- if admin_id . nil? #or !team.admin?(admin)
30
- errors . add ( :admin_id , "must be team admin to create an account" )
31
- end
32
- end
33
-
34
27
def subscribe_to! ( plan , force = false )
35
28
self . plan_ids = [ plan . id ]
36
29
if force || update_on_stripe ( plan )
You can’t perform that action at this time.
0 commit comments