diff options
| author | Luc Donnet | 2018-02-19 11:04:29 +0100 | 
|---|---|---|
| committer | Luc Donnet | 2018-02-19 11:04:29 +0100 | 
| commit | 7b17deff51545358009cb417cbb9d796565e7540 (patch) | |
| tree | a43a5586ad39d838dd607e600dbc15ff18a58ab3 /app/controllers/lines_controller.rb | |
| parent | 89428163fc93a7e09ebb0ca47939f8558afeb5eb (diff) | |
| parent | 5f6008d165df4499319a2121a71842657d6ac3c9 (diff) | |
| download | chouette-core-7b17deff51545358009cb417cbb9d796565e7540.tar.bz2 | |
Merge branch 'master' into 0000-docker
Diffstat (limited to 'app/controllers/lines_controller.rb')
| -rw-r--r-- | app/controllers/lines_controller.rb | 10 | 
1 files changed, 7 insertions, 3 deletions
| diff --git a/app/controllers/lines_controller.rb b/app/controllers/lines_controller.rb index 571c73f4a..27a9bf9be 100644 --- a/app/controllers/lines_controller.rb +++ b/app/controllers/lines_controller.rb @@ -1,6 +1,8 @@  class LinesController < ChouetteController    include ApplicationHelper +  include Activatable    include PolicyChecker +    defaults :resource_class => Chouette::Line    respond_to :html    respond_to :xml @@ -13,9 +15,8 @@ class LinesController < ChouetteController    def index      @hide_group_of_line = line_referential.group_of_lines.empty?      index! do |format| -      @lines = ModelDecorator.decorate( +      @lines = LineDecorator.decorate(          @lines, -        with: LineDecorator,          context: {            line_referential: @line_referential,            current_organisation: current_organisation @@ -67,7 +68,6 @@ class LinesController < ChouetteController      respond_to do |format|        format.json { render :json => filtered_lines_maps}      end -    end    protected @@ -112,6 +112,10 @@ class LinesController < ChouetteController    alias_method :current_referential, :line_referential    helper_method :current_referential +  def begin_of_association_chain +    current_organisation +  end +    def line_params      params.require(:line).permit(        :transport_mode, | 
