# Sorting a listing page

**URL:** <https://www.ruby-forum.com/t/sorting-a-listing-page/188186>\
**Category:** Rails\
**Created:** [May 7, 2010, 7:47am UTC](https://www.ruby-forum.com/t/sorting-a-listing-page/188186 "2010-05-07T07:47:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tom-mac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/bc8723/32.png) [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Post date:** [May 7, 2010, 7:47am UTC](https://www.ruby-forum.com/t/sorting-a-listing-page/188186/1 "2010-05-07T07:47:33Z")

</div>

Hi  
I have a list page for users. I am using will\_paginate for  
pagination. So an example is

full\_name(f\_name+l\_name) email unit(this an integer colum is  
user.buildng.unit)

Clinton Trone removed\_email\_address@domain.invalid 2  
Evette Pace removed\_email\_address@domain.invalid 2  
Brett B removed\_email\_address@domain.invalid 10  
…

```
     My requirement is to sort by any of the headings ie

```

first\_name, email or unit on clicking them. Also I need Alphabetical  
sorting .Like there will be  
All,A,B,C …Z,Other  
in the list page. Then on clicking suppose D the paginated list has  
to sorted by letter ‘D’ like that. I have no idea how to implement this.  
Please help

Thanks in advance  
Tom

---

<div class="post-metadata">

**Author:** ![tom-mac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/bc8723/32.png) [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Post date:** [May 7, 2010, 10:55am UTC](https://www.ruby-forum.com/t/sorting-a-listing-page/188186/2 "2010-05-07T10:55:43Z")

</div>

Hi  
In short I am searching the best grid plug/gem in rails

Thanks  
Tom

---

<div class="post-metadata">

**Author:** ![tom-mac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/bc8723/32.png) [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Post date:** [May 9, 2010, 6:04pm UTC](https://www.ruby-forum.com/t/sorting-a-listing-page/188186/3 "2010-05-09T18:04:39Z")

</div>

Hi  
I still could not get an exact choice. I found this  
[http://www.2dconcept.com/jquery-grid-rails-plugin](http://www.2dconcept.com/jquery-grid-rails-plugin)

```
But suppose if have a column like full_name but it is not a db 

```

column ( i have db columns firstname and lastname) then what I will do?  
If anybody has any other choice than please help.

Thanks  
Tom
