adds budget results
This commit is contained in:
21
app/controllers/budgets/results_controller.rb
Normal file
21
app/controllers/budgets/results_controller.rb
Normal file
@@ -0,0 +1,21 @@
|
||||
module Budgets
|
||||
class ResultsController < ApplicationController
|
||||
|
||||
load_and_authorize_resource :budget
|
||||
|
||||
def show
|
||||
@result = load_result
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def load_result
|
||||
Budget::Result.new(@budget, heading)
|
||||
end
|
||||
|
||||
def heading
|
||||
@budget.headings.find(params[:heading_id])
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user