fixes permission error when entering my ballot

This commit is contained in:
kikito
2017-01-05 18:25:00 +01:00
parent f4f0980fe9
commit b36bb7bb97

View File

@@ -3,9 +3,9 @@ module Budgets
before_action :authenticate_user!
load_and_authorize_resource :budget
before_action :load_ballot
authorize_resource :ballot, through: :budget
def show
authorize! :show, @ballot
render template: "budgets/ballot/show"
end