The personal finance app for everyone
Allow connecting a few accounts before upgrade prompt
Josh Pigford1620d56e2db5
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rbindex 3643c9c7..7c9e98ca 100644--- a/app/controllers/application_controller.rb+++ b/app/controllers/application_controller.rb@@ -12,6 +12,7 @@ class ApplicationController < ActionController::Basereturn false unless Current.sessionreturn false if Current.family.subscribed?return false if subscription_pending? || request.path == settings_billing_path+ return false if Current.family.active_accounts_count <= 3trueenddiff --git a/app/models/family.rb b/app/models/family.rbindex 329f8e3f..9a277f43 100644--- a/app/models/family.rb+++ b/app/models/family.rb@@ -209,6 +209,10 @@ class Family < ApplicationRecordentries.order(:date).first&.date || Date.currentend+ def active_accounts_count+ accounts.active.count+ end+privateCategoriesWithTotals = Struct.new(:total_money, :category_totals, keyword_init: true)CategoryWithStats = Struct.new(:category, :amount_money, :percentage, keyword_init: true)