From 35b6a919e1eedb10b88385fb7f36c799794225d6 Mon Sep 17 00:00:00 2001 From: Thomas Haddad Date: Wed, 15 Feb 2017 10:29:37 +0100 Subject: Refs #2521: WIP footnotes api for vehicle journey footnotes Signed-off-by: Thomas Shawarma Haddad --- app/controllers/line_footnotes_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) (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 3b44d087c..0e14eed04 100644 --- a/app/controllers/line_footnotes_controller.rb +++ b/app/controllers/line_footnotes_controller.rb @@ -1,6 +1,9 @@ class LineFootnotesController < ChouetteController defaults :resource_class => Chouette::Line, :instance_name => 'line' before_action :check_policy, only: [:edit, :update, :destroy] + + respond_to :json, :only => :show + belongs_to :referential def show @@ -32,6 +35,7 @@ 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 From c6230a7ca7ff6cbcb1d685527f80e0fb3d1aad8f Mon Sep 17 00:00:00 2001 From: Xinhui Date: Wed, 15 Feb 2017 10:45:08 +0100 Subject: Wip line_footnotes#show json format --- app/controllers/line_footnotes_controller.rb | 1 - 1 file changed, 1 deletion(-) (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 0e14eed04..51516c3ff 100644 --- a/app/controllers/line_footnotes_controller.rb +++ b/app/controllers/line_footnotes_controller.rb @@ -1,7 +1,6 @@ class LineFootnotesController < ChouetteController defaults :resource_class => Chouette::Line, :instance_name => 'line' before_action :check_policy, only: [:edit, :update, :destroy] - respond_to :json, :only => :show belongs_to :referential -- cgit v1.2.3