On Feb 16, 2012, at 7:44 AM, Dl33ter Yay wrote: > Hi! > > It's more "click on a header to sort by that attribute". > > For example, if you click on the name of the column (Marque) this should > sort alphabetical ASC and DESC: AUDI - BMW - VOLKSWAGEN / Re-click : > VOLKSWAGEN - BMW - AUDI. > > Like I said in my 1st post, I'm following this screencast : > http://railscasts.com/episodes/228-sortable-table-columns > > You can see on this page a thumbail of the result. > > But in my case, it's with multiple table ( Marque, Modele, Energie...) > > The screencast work perfectly when everything is in the same table. > > But I want to do it with content from other table. > > Again, if you need my code, juste ask what you want.
What does your controller look like, and what does your view look like where you build this table? If you're pulling from multiple models, you're doing that somewhere in the controller (I hope) and building an array for marques, models and energies. That's where the sorting needs to happen. Walter > > Thanks for your answer. > Bye! > ++++ > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

