app/controllers/admin/cms_controller.rb
def add_pagination_and_sorting( query )

      query.paginate( page: params[:page] ).order( "#{sort_column} #{( sort_order == 'a' ) ? 'ASC' : 'DESC' }" )

    end
# Utility function that adds pagination and ordering parameters to the index/search queries.
Utility function that adds pagination and ordering parameters to the index/search queries.
Utility function that adds pagination and ordering parameters to the index / search queries .
def add_pagination_and_sorting( query )
      query.paginate( page: params[:page] ).order( "#{sort_column} #{( sort_order == 'a' ) ? 'ASC' : 'DESC' }" )
    end
def add_pagination_and_sorting ( query ) query . paginate ( page : params [ :page ] ) . order ( "#{sort_column} #{( sort_order == 'a' ) ? 'ASC' : 'DESC' }" ) end
Utility function that adds pagination and ordering parameters to the index/search queries.
Utility function that adds pagination and ordering parameters to the index / search queries .
query