diff options
Diffstat (limited to 'app/controllers/time_tables_controller.rb')
| -rw-r--r-- | app/controllers/time_tables_controller.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/time_tables_controller.rb b/app/controllers/time_tables_controller.rb index 10e1e76dc..ec62dfb98 100644 --- a/app/controllers/time_tables_controller.rb +++ b/app/controllers/time_tables_controller.rb @@ -8,6 +8,8 @@ class TimeTablesController < ChouetteController belongs_to :referential + before_action :check_policy, only: [:edit, :update, :destroy] + def show @year = params[:year] ? params[:year].to_i : Date.today.cwyear @time_table_combination = TimeTableCombination.new @@ -112,6 +114,10 @@ class TimeTablesController < ChouetteController referential_time_tables_path(referential) end + def check_policy + authorize resource + end + private def time_table_params |
