Class: Eboshi::BudgetsController
Instance Method Summary
collapse
#assignment_path, #assignments_path, #convert_work_path, #edit_adjustment_path, #edit_invoice_path, #edit_work_path, #invoice_path, #invoices_path, #line_item_path, #merge_works_path, #new_adjustment_path, #new_assignment_path, #new_invoice_path, #new_payment_path, #payments_path, #work_path
Instance Method Details
#create ⇒ Object
10
11
12
13
14
|
# File 'app/controllers/eboshi/budgets_controller.rb', line 10
def create
@budget = @client.budgets.build(params[:budget])
@budget.save!
redirect_to [@client, :invoices], notice: "Budget created"
end
|
#destroy ⇒ Object
27
28
29
30
|
# File 'app/controllers/eboshi/budgets_controller.rb', line 27
def destroy
@client.budgets.destroy(params[:id])
redirect_to [@client, :invoices], notice: "Budget destroy"
end
|
#edit ⇒ Object
16
17
18
19
|
# File 'app/controllers/eboshi/budgets_controller.rb', line 16
def edit
@budget = @client.budgets.find(params[:id])
render :form
end
|
#new ⇒ Object
5
6
7
8
|
# File 'app/controllers/eboshi/budgets_controller.rb', line 5
def new
@budget = @client.budgets.build
render :form
end
|
#update ⇒ Object
21
22
23
24
25
|
# File 'app/controllers/eboshi/budgets_controller.rb', line 21
def update
@budget = @client.budgets.find(params[:id])
@budget.update!(params[:budget])
redirect_to [@client, :invoices], notice: "Budget updated"
end
|