aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/routes_controller.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/routes_controller.rb b/app/controllers/routes_controller.rb
index 89d2ddef4..be6329006 100644
--- a/app/controllers/routes_controller.rb
+++ b/app/controllers/routes_controller.rb
@@ -10,10 +10,11 @@ class RoutesController < ChouetteController
end
before_action :define_candidate_opposite_routes, only: [:new, :edit, :create, :update]
+ before_action :check_policy, only: [:edit, :update, :destroy]
def index
index! do |format|
- format.html { redirect_to referential_line_path(@referential,@line) }
+ format.html { redirect_to referential_line_path(@referential, @line) }
end
end
@@ -85,6 +86,10 @@ class RoutesController < ChouetteController
end
end
+ def check_policy
+ authorize resource
+ end
+
private
def route_params