aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/line_footnotes_controller.rb
diff options
context:
space:
mode:
authorThomas Haddad2017-02-15 10:29:37 +0100
committerThomas Haddad2017-02-15 10:29:37 +0100
commit35b6a919e1eedb10b88385fb7f36c799794225d6 (patch)
tree52b1a9c4796c40bde6a79531c13025007951a4de /app/controllers/line_footnotes_controller.rb
parent3c3bf04763105c5e4de8bdbf611fbb6a8dbeb03a (diff)
downloadchouette-core-35b6a919e1eedb10b88385fb7f36c799794225d6.tar.bz2
Refs #2521: WIP footnotes api for vehicle journey footnotes
Signed-off-by: Thomas Shawarma Haddad <thomas.haddad@af83.com>
Diffstat (limited to 'app/controllers/line_footnotes_controller.rb')
-rw-r--r--app/controllers/line_footnotes_controller.rb4
1 files changed, 4 insertions, 0 deletions
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