Module: Datatable::Sorting::ClassMethods

Defined in:
app/tables/datatable/sorting.rb

Instance Method Summary collapse

Instance Method Details

#initial_ordering(orderings) ⇒ Object

Gotta set these to fight against datatables’ default ordering on first column



11
12
13
# File 'app/tables/datatable/sorting.rb', line 11

def initial_ordering(orderings)
  self.set_initial_orderings orderings
end

#set_initial_orderings(orderings) ⇒ Object



14
15
16
17
# File 'app/tables/datatable/sorting.rb', line 14

def set_initial_orderings(orderings)
  self.initial_orderings = {} if self.initial_orderings.nil?
  self.initial_orderings.merge! orderings
end