aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/line_footnotes_controller.rb
diff options
context:
space:
mode:
authorXinhui2017-03-24 14:40:31 +0100
committerXinhui2017-03-24 14:40:37 +0100
commit39306cc71c1a4f2649b29a090712b8fa8b3a57a4 (patch)
tree8273bfe10019acdfa15fe770b9af315683c93117 /app/controllers/line_footnotes_controller.rb
parent1b1fdd896eb2d550464cea51c50a8e82e4bc47cd (diff)
downloadchouette-core-39306cc71c1a4f2649b29a090712b8fa8b3a57a4.tar.bz2
Fix LineFootnotesController# policy_check
Refs #2944
Diffstat (limited to 'app/controllers/line_footnotes_controller.rb')
-rw-r--r--app/controllers/line_footnotes_controller.rb7
1 files changed, 3 insertions, 4 deletions
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