lib/acts_as_data_table/shared/session.rb
#
# Changes the sorting direction for the given column
# If no direction is given, it will change it to the opposite of the current direction
#
Changes the sorting direction for the given column
If no direction is given, it will change it to the opposite of the current direction
Changes the sorting direction for the given column If no direction is given it will change it to the opposite of the current direction
def change_direction!(model_name, column_name, direction = nil)
          if active_column?(model_name, column_name)
            ca    = column_array(model_name, column_name)
            ca[1] = (direction || opposite_direction(ca.last)).to_s.upcase
          end
        end
def change_direction! ( model_name , column_name , direction = nil ) if active_column? ( model_name , column_name ) ca = column_array ( model_name , column_name ) ca [ 1 ] = ( direction || opposite_direction ( ca . last ) ) . to_s . upcase end end
Changes the sorting direction for the given column
If no direction is given, it will change it to the opposite of the current direction
Changes the sorting direction for the given column If no direction is given it will change it to the opposite of the current direction
model_name
column_name
direction