From 436efb7c5f52e79c7086f2c10a79c05dcf56458a Mon Sep 17 00:00:00 2001 From: Eric Date: Mon, 22 Jun 2020 17:10:08 -0500 Subject: [PATCH] Add billing_subscription to nonprofit by default --- app/models/nonprofit.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/nonprofit.rb b/app/models/nonprofit.rb index b6b3a6f5..da6d80a5 100755 --- a/app/models/nonprofit.rb +++ b/app/models/nonprofit.rb @@ -131,6 +131,7 @@ class Nonprofit < ApplicationRecord before_validation(on: :create) do set_slugs set_user + add_billing_subscription self end @@ -253,9 +254,8 @@ private end def add_billing_subscription - billing_plan = BillingPlan.find(Houdini.default_bp.id) + billing_plan = BillingPlan.find(Houdini.default_bp) b_sub = build_billing_subscription(billing_plan: billing_plan, status: 'active') - b_sub.save! end def user_registerable_as_admin