update control with cancancan in sidebar

This commit is contained in:
Aung Myo
2017-10-27 17:37:34 +06:30
parent 79a46ba7cf
commit a1c812574a
7 changed files with 100 additions and 61 deletions

View File

@@ -1,4 +1,5 @@
class Settings::CommissionersController < ApplicationController
load_and_authorize_resource except: [:create]
before_action :set_commissioner, only: [:show, :edit, :update, :destroy]
# GET /commissioners

View File

@@ -1,4 +1,5 @@
class Settings::CommissionsController < ApplicationController
load_and_authorize_resource except: [:create]
before_action :set_commission, only: [:show, :edit, :update, :destroy]
# GET /commissions

View File

@@ -1,4 +1,5 @@
class Settings::ProductsController < ApplicationController
load_and_authorize_resource except: [:create]
before_action :set_settings_product, only: [:show, :edit, :update, :destroy]
# GET /settings/products

View File

@@ -1,4 +1,5 @@
class Settings::PromotionsController < ApplicationController
load_and_authorize_resource except: [:create]
before_action :set_promotion, only: [:show, :edit, :update, :destroy]
# GET /promotions