Model.find(:all) - return a list of ids

Giant Cranes wrote:

Hi,

I currently call find(:all, ...) on one of my models and it return a page of models.

I am now looking at adding a memcached server and want the find(:all..) to only return model ids, the models will be individually retrieved from the cache.

Is this something that ActiveRecord supports or should I write a custom bit of sql?

Thanks, GiantCranes

ids = Model.find(:all, :select => "id")