From c668cc1ab9c6f5f3f05df4020a52faa33c51349e Mon Sep 17 00:00:00 2001 From: benji Date: Mon, 31 Aug 2015 15:35:59 +0200 Subject: [PATCH] cancancan fix --- app/controllers/orders_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/orders_controller.rb b/app/controllers/orders_controller.rb index 642cbc1..7502def 100644 --- a/app/controllers/orders_controller.rb +++ b/app/controllers/orders_controller.rb @@ -2,7 +2,7 @@ class OrdersController < ApplicationController include ActionView::Helpers::NumberHelper include ApplicationHelper - load_and_authorize_resource :user + load_resource :user load_and_authorize_resource :order, through: :user, shallow: true def new