It seems as if using the max aggregate is not necessary. By ordering in descending order of the created_on column its going to find the MAX and go from there.
You could probably get away with:
Foo.all(fields: [:bar], unique: true, order: [created_on.desc])
without using .max in the order.
This would be same as:
SELECT "bar" FROM "foo" GROUP BY "bar" ORDER BY "created_on" DESC
Hope this works.
Also take a look at http://datamapper.org/docs/find.html