diff options
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/lines_controller.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/controllers/lines_controller.rb b/app/controllers/lines_controller.rb index a5be8ca44..6968618b8 100644 --- a/app/controllers/lines_controller.rb +++ b/app/controllers/lines_controller.rb @@ -7,8 +7,9 @@ class LinesController < ChouetteController protected - def collection - @lines ||= referential.lines.order_by [[sort_column.to_sym, sort_direction.to_sym]] + def collection + @q = Chouette::Line.search(params[:q]) + @lines ||= @q.result(:distinct => true).paginate(:page => params[:page], :per_page => 10) end def sort_column |
