Skip to content

Instantly share code, notes, and snippets.

View Fishy49's full-sized avatar
💭
It's probably fine

Rick Cagle Fishy49

💭
It's probably fine
View GitHub Profile
@Fishy49
Fishy49 / orders_datatable_string_agg.rb
Created November 19, 2019 19:00
STRING_AGG implementation of orders datatable - breaks the dang COUNT calls
class Datatables::Orders < Datatables::Model[Order]
include Routeable
column :row_toggle, nil, title: '', class: 'text-center cursor-pointer'
column :line_item_search, nil, visible: false
column :invoice_number, ->(r) { link_to(r.invoice_number, order_path(r), remote: true) }, title: 'Order #'
column :entry_date, ->(r) { r.entry_date&.strftime('%m/%d/%Y') }, title: 'Order Date'
column :order_type
column :status_description, title: 'Status'
column :no_of_lines, title: 'Line Items'
column :customer_po, title: 'PO'
  • Dial it in!
  • Insufficient Iceberg
  • Ready to Thrive!
  • The Dojo of Mojo
  • Pee in a bottle
  • Priority Tool
  • I feel pretty
  • Reciprocating Dinglearm
  • Lunar Wane Shaft
  • Hello Sexy Pants

Keybase proof

I hereby claim:

  • I am fishy49 on github.
  • I am fishy49 (https://keybase.io/fishy49) on keybase.
  • I have a public key ASAoRvjQQzpQwvo4vZMFU_hw4i6etASz-5DVECrG9XsUrgo

To claim this, I am signing this object: