I would like to use the paginator helper to order by a quantity that is

the product of two database columns.

Is there a simple way to do this?

I would like to use the paginator helper to order by a quantity that is

the product of two database columns.

Is there a simple way to do this?

Alan C. wrote:

I would like to use the paginator helper to order by a quantity that is

the product of two database columns.Is there a simple way to do this?

Someone will correct me if I’m wrong, but by using simple SQL you should

be able to do…

:order => “(col1 * col2)”

I’m also assuming that by product you mean multiplication. You can of

course do any simple maths, or even other SQL queries in here.