Are you using 1.4.0.pre7?  If so, that should actually work as is.

If you can't switch to 1.4.0.pre7, you can do something like:

    if parse_sort_param('user', 'user.email_address')
      db_sort_field = {
        "user" => "users.last_name",
        "user.email_address" => "users.email_address",
      }[@sort_field]
      order_by=[db_sort_field, @sort_direction]
    else
      order_by=["users.last_name", "asc"]
      @sort_field = "user"
      @sort_direction = "asc"
    end

then use :order_by => order_by

Bryan

On Mon, Jul 23, 2012 at 11:18 AM, tomkins <[email protected]> wrote:
> I have a table plus with fields that I can order, using:  :order_by =>
> parse_sort_param(:name, num)
> How can I do this for something like :company.contact so it would be
> :order_by => parse_sort_param(:name, num, company.contact)
> This gives an error when I navigate to the page the table is on.
> Thanks.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Hobo Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/hobousers/-/3cHHSq7XHjYJ.
> 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/hobousers?hl=en.

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" 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/hobousers?hl=en.

Reply via email to