From 39306cc71c1a4f2649b29a090712b8fa8b3a57a4 Mon Sep 17 00:00:00 2001 From: Xinhui Date: Fri, 24 Mar 2017 14:40:31 +0100 Subject: Fix LineFootnotesController# policy_check Refs #2944 --- app/controllers/line_footnotes_controller.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'app/controllers/line_footnotes_controller.rb') diff --git a/app/controllers/line_footnotes_controller.rb b/app/controllers/line_footnotes_controller.rb index 8f7a38512..7bc048731 100644 --- a/app/controllers/line_footnotes_controller.rb +++ b/app/controllers/line_footnotes_controller.rb @@ -1,15 +1,15 @@ -class LineFootnotesController < ChouetteController - defaults :resource_class => Chouette::Line, :instance_name => 'line' +class LineFootnotesController < BreadcrumbController + defaults :resource_class => Chouette::Line include PolicyChecker before_action :check_policy, only: [:edit, :update, :destroy] respond_to :json, :only => :show - belongs_to :referential def show show! do build_breadcrumb :show end + @footnotes = @line.footnotes end def edit @@ -37,7 +37,6 @@ class LineFootnotesController < ChouetteController def resource @referential = Referential.find params[:referential_id] @line = @referential.lines.find params[:line_id] - @footnotes = @line.footnotes end def line_params -- cgit v1.2.3