Tag Archives: ActiveRecord

Unique Values – Ruby on Rails

Just a quick post on how to select unique values in rails using the uniq operator:

#All recent categories


#Results
Cars
Trucks
Cars
Technology
Phones
Technology
...
#Unique recent categories


Cars
Trucks
Technology
Phones
...
Advertisements