Module: LightningUiKit::Sortable

Defined in:
app/controllers/concerns/lightning_ui_kit/sortable.rb

Overview

Controller mixin for server-side table sorting:

class OrdersController < ApplicationController
include LightningUiKit::Sortable

def index
  @orders = lui_sort(Order.all, allowed: %w[number total created_at], default: :created_at)
end
end