adds budget's groups & headings to admin

This commit is contained in:
Juanjo Bazán
2016-08-03 20:23:41 +02:00
parent 64a614c67f
commit 0f7e23bec4
13 changed files with 220 additions and 8 deletions

View File

@@ -0,0 +1,15 @@
class Admin::BudgetGroupsController < Admin::BaseController
def create
@budget = Budget.find params[:budget_id]
@budget.groups.create(budget_group_params)
@groups = @budget.groups.includes(:headings)
end
private
def budget_group_params
params.require(:budget_group).permit(:name)
end
end