Ruby 1.8.7: replace distinct: true with :distinct => true