SortHelper2 - Multiple Table / Coumn Sorting

When working with Rails for the rewrite of our site management utility I had the need to perform sorting on multiple columns of a result set. SortHelper2 is clean and works well for one table but it doesn’t support multiple tables. I present:

SortHelper2 - Multiple Tables

Please leave a comment with any bugs/issues you find.

Todo:

  • Add Tests

4 Responses to “SortHelper2 - Multiple Table / Coumn Sorting”

  1. Andy Says:

    This is a great little thing, is there any way of getting it to sort results returned by ‘acts_as_ferret’?

  2. montana Says:

    Andy,

    I don’t think that ‘acts_as_ferret’ supports sorting in the sense that this plugin works with.

    When using Ferret (Lucene) you are looking for relevant results. The sorting of the results is determined by parameters inside of Ferret. Unlike an active record .find() there is no :order parameter which is used here. You might check this page and read up on the different properties that can be associated with fields of an active record.

  3. Andy Says:

    Thanks for this.

  4. Karim Helal Says:

    Hi,

    Thanks for a great little helper. I’m trying to figure out tho how to sort multiple tables on the same page. Is that something which is feasible?

    i.e. in my dashboard page, i want to display 2 tables, A and B, each one being sortable and paginated.

    Thanks,

    .Karim

Leave a Reply