uses a more efficient way of getting category names

This commit is contained in:
rgarcia
2016-02-19 18:45:45 +01:00
parent e836a3c665
commit de8b7cdb70

View File

@@ -35,7 +35,7 @@ module ActsAsTaggableOn
end
def self.category_names
Tag.where("kind = 'category'").map {|tag| tag.name }
Tag.where("kind = 'category'").pluck(:name)
end
private