aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/line_footnotes_controller.rb
diff options
context:
space:
mode:
authorThomas Haddad2017-03-09 18:06:30 +0100
committerThomas Haddad2017-03-09 18:06:30 +0100
commitf14fbad37c0daa0b79aaf12b234168e917b29cee (patch)
treee5149f670c704b5cc7b11f5063bad16125d8ae5e /app/controllers/line_footnotes_controller.rb
parentf4c5751a4037f52ab1d73fc201e81ba07798ecd4 (diff)
parent3ec5c7bf65b267ce96431906feb6025cfbff347a (diff)
downloadchouette-core-f14fbad37c0daa0b79aaf12b234168e917b29cee.tar.bz2
Merge branch '2498_vehicle_journeys'
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 192f902c8..8f7a38512 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'
include PolicyChecker
+ before_action :check_policy, only: [:edit, :update, :destroy]
+ respond_to :json, :only => :show
+
belongs_to :referential
def show
@@ -34,6 +37,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