Forum: Ruby on Rails SortHelper problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
30f3084a34f811f9262394ed31ca2e24?d=identicon&s=25 Paul Nichols (pcdj)
on 2007-07-30 11:04
I have TableA with name, description, start time displayed on one page.

TableB has name, comment, file path and is displayed on another page.

I'm using the SortHelper2 helper to help me sort the columns of these
tables, however I'm experiencing a problem whereby if I sort TableA by
description and then go ahead and view TableB I get an error message
saying SQL Command Failed, Invalid column name 'description'.

This is obviously because SortHelper is remembering the last chosen
column to sort by, and the description column doesn't exist in TableB.

So is SortHelper only designed to assist with sorting just the one table
per application (which seems silly to me), or am I missing something
here?

I've had a quick search on SortHelper and posts are few and far between,
so if someone can suggest an alternative sorting plugin/helper instead
please go ahead!
931a7dbce1e64e15f6a8d4c1e2eb1e79?d=identicon&s=25 Chuck Vose (Guest)
on 2007-07-30 18:22
(Received via mailing list)
> This is obviously because SortHelper is remembering the last chosen
> column to sort by, and the description column doesn't exist in TableB.
>
> So is SortHelper only designed to assist with sorting just the one table
> per application (which seems silly to me), or am I missing something
> here?

On the SortHelper2 page there's a snippet at the bottom where the dev
mentions multiple tables and how to get the code to do them.

"I have modified this to work with sorting on multiple tables. Email
me if you need the code, don't feel like cleaning it up if no one
wants it.
(http://oregonstate.edu/tools/mailform?osu=43568971...)
-George"

http://wiki.rubyonrails.org/rails/pages/SortHelper2
30f3084a34f811f9262394ed31ca2e24?d=identicon&s=25 Paul Nichols (pcdj)
on 2007-07-31 10:30
Chuck Vose wrote:
>> This is obviously because SortHelper is remembering the last chosen
>> column to sort by, and the description column doesn't exist in TableB.
>>
>> So is SortHelper only designed to assist with sorting just the one table
>> per application (which seems silly to me), or am I missing something
>> here?
>
> On the SortHelper2 page there's a snippet at the bottom where the dev
> mentions multiple tables and how to get the code to do them.
>
> "I have modified this to work with sorting on multiple tables. Email
> me if you need the code, don't feel like cleaning it up if no one
> wants it.
> (http://oregonstate.edu/tools/mailform?osu=43568971...)
> -George"
>
> http://wiki.rubyonrails.org/rails/pages/SortHelper2

Yes, i have tried that. Unfortunately the mail gets bounced back.

Fortunately i've found an alternative. Thanks anyway.
F8b02e0baa9e6550e02a8761d7269069?d=identicon&s=25 George Montana Harkin (Guest)
on 2007-08-03 00:00
(Received via mailing list)
Hi Paul,

I've posted my update to the SortHelper online:
http://montanaharkin.net/2007/08/02/rails-sorthelp...

Cheers,
George

On Jul 31, 1:30 am, Paul Nichols <rails-mailing-l...@andreas-s.net>
This topic is locked and can not be replied to.