mirror of
https://github.com/we-promise/sure.git
synced 2026-04-16 10:34:09 +00:00
Providers sharing (#1273)
* third party provider scoping * Simplify logic and allow only admins to mange providers * Broadcast fixes * FIX tests and build * Fixes * Reviews * Scope merchants * DRY fixes
This commit is contained in:
@@ -53,12 +53,12 @@ class BudgetsController < ApplicationController
|
||||
|
||||
def set_budget
|
||||
start_date = Budget.param_to_date(params[:month_year], family: Current.family)
|
||||
@budget = Budget.find_or_bootstrap(Current.family, start_date: start_date)
|
||||
@budget = Budget.find_or_bootstrap(Current.family, start_date: start_date, user: Current.user)
|
||||
raise ActiveRecord::RecordNotFound unless @budget
|
||||
end
|
||||
|
||||
def redirect_to_current_month_budget
|
||||
current_budget = Budget.find_or_bootstrap(Current.family, start_date: Date.current)
|
||||
current_budget = Budget.find_or_bootstrap(Current.family, start_date: Date.current, user: Current.user)
|
||||
redirect_to budget_path(current_budget)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user