aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/referential_lines_controller.rb
diff options
context:
space:
mode:
authorVlatka Pavisic2017-02-06 11:42:12 +0100
committerVlatka Pavisic2017-02-07 11:25:29 +0100
commitd94b1271d147fdb5bbd1e616e116173198e858db (patch)
treee1b5631e72e009ffd80fdf4e47159b2b11cd899e /app/controllers/referential_lines_controller.rb
parent9c3095c20aaef122212ed71ce8818e3a18b13308 (diff)
downloadchouette-core-d94b1271d147fdb5bbd1e616e116173198e858db.tar.bz2
Refs #2476 : Disable modification and deletion of resources from another referential; in progress
Diffstat (limited to 'app/controllers/referential_lines_controller.rb')
-rw-r--r--app/controllers/referential_lines_controller.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/app/controllers/referential_lines_controller.rb b/app/controllers/referential_lines_controller.rb
index 4ffee27cb..c0d71d891 100644
--- a/app/controllers/referential_lines_controller.rb
+++ b/app/controllers/referential_lines_controller.rb
@@ -1,5 +1,5 @@
class ReferentialLinesController < ChouetteController
- before_action :check_policy, :only => [:edit, :update, :destroy]
+ include PolicyChecker
defaults :resource_class => Chouette::Line, :collection_name => 'lines', :instance_name => 'line'
respond_to :html
@@ -95,10 +95,6 @@ class ReferentialLinesController < ChouetteController
%w[asc desc].include?(params[:direction]) ? params[:direction] : 'asc'
end
- def check_policy
- authorize resource
- end
-
def line_params
params.require(:line).permit(
:transport_mode,