From 24e47521f1a57c73dc349de35909af7e1f8a4a1f Mon Sep 17 00:00:00 2001 From: spag Date: Thu, 17 Jan 2013 17:50:47 +0100 Subject: group by table --- app/controllers/call_routes_controller.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/controllers') diff --git a/app/controllers/call_routes_controller.rb b/app/controllers/call_routes_controller.rb index 41abe6d..b0c173d 100644 --- a/app/controllers/call_routes_controller.rb +++ b/app/controllers/call_routes_controller.rb @@ -4,6 +4,8 @@ class CallRoutesController < ApplicationController before_filter :spread_breadcrumbs def index + @call_routes = CallRoute.order(['`table`', :position]) + @tables = @call_routes.pluck('`table`').uniq.sort end def show -- cgit v1.2.3