Dynamic finder > popularity


#1

Hi,

i have popularity table wich has a relationship with the
bookings-destinations. Some destinations are booked more then others.

The popularity table has the columns “primary-key” and a score.

Example

| TVC | 6 |
| AZO | 4 |
| TUO | 3 |
| IVC | 1 |
| VKO | 1 |
| DMM | 1 |

Qeustion: how can i use a dynamic finder…with the purpose “show me the
the top 20 popularity destinations”

Grtz…remco


#2

So a

Destination.find(:all, :limit => 20, :order => ‘popularity desc’ )

is no good?