Sha256: aa802440243fa34da1004ef77adae3ac1113b6618e6218cb82d374d512b9e92a
Contents?: true
Size: 448 Bytes
Versions: 17
Compression:
Stored size: 448 Bytes
Contents
# encoding: utf-8 class CustomOrderingWithArelController < ApplicationController def index @status_grid1 = initialize_grid(Status, order: 'statuses.name', custom_order: { 'statuses.name' => Arel.sql('length( ? )') } ) @status_grid2 = initialize_grid(Status, name: 'g2', order: 'statuses.name', custom_order: { 'statuses.name' => Status.arel_table[:position] } ) end end
Version data entries
17 entries across 17 versions & 2 rubygems