It's because it's what happen when you do
def self.all_categories
Attraction.select("DISTINCT category")
end
It's create an Attraction Object with attribute define by your field. You can do
def self.all_categories
Attraction.select("DISTINCT category").map(&:category)
end