diff options
| author | jpl | 2017-02-13 15:32:06 +0100 | 
|---|---|---|
| committer | jpl | 2017-02-13 15:32:06 +0100 | 
| commit | 55468b29bb5b23bfeb8ebe439ed62e5214284a3d (patch) | |
| tree | f6877faad540ee98fcbd726ec7592367fb00a93c /app/controllers/referential_lines_controller.rb | |
| parent | 1091a971433fd706941585ac011ee72e6cd2bb73 (diff) | |
| download | chouette-core-55468b29bb5b23bfeb8ebe439ed62e5214284a3d.tar.bz2 | |
Refs #2597: updatings line_referentials#show, according to new AD
Diffstat (limited to 'app/controllers/referential_lines_controller.rb')
| -rw-r--r-- | app/controllers/referential_lines_controller.rb | 7 | 
1 files changed, 4 insertions, 3 deletions
| diff --git a/app/controllers/referential_lines_controller.rb b/app/controllers/referential_lines_controller.rb index c0d71d891..a91ad4b6b 100644 --- a/app/controllers/referential_lines_controller.rb +++ b/app/controllers/referential_lines_controller.rb @@ -24,7 +24,7 @@ class ReferentialLinesController < ChouetteController    def show      @map = LineMap.new(resource).with_helpers(self) -    @routes = @line.routes.order(:name) +    @routes = @line.routes.order(:name).paginate(page: params[:page], per_page: 10)      @group_of_lines = @line.group_of_lines      show! do        build_breadcrumb :show @@ -79,10 +79,11 @@ class ReferentialLinesController < ChouetteController      @q = referential.lines.search(params[:q])      if sort_column && sort_direction -      @lines ||= @q.result(:distinct => true).order(sort_column + ' ' + sort_direction).paginate(:page => params[:page]).includes([:network, :company]) +      @lines ||= @q.result(:distinct => true).order(sort_column + ' ' + sort_direction)      else -      @lines ||= @q.result(:distinct => true).order(:number).paginate(:page => params[:page]).includes([:network, :company]) +      @lines ||= @q.result(:distinct => true).order(:number)      end +    @lines = @lines.paginate(page: params[:page], per_page: 10).includes([:network, :company])    end | 
