---
url: /reference/generators/taxonomies.md
---
# Taxonomies

```sh
bin/rails g trek:taxonomies
```

Sets up a tagging & categorization system:

* the [`Tag`, `TagCategory` and `Tagging` models](/reference/models/tag) with their migrations
* the admin panel to manage tags and categories

Once installed, make any model taggable with the [`Trek::Taggable`](/reference/concerns/taggable) concern:

```ruby
class Article < ApplicationRecord
  include Trek::Taggable
end

article.tags << Tag.find_or_create_by(name: "Ruby")
article.tag_names # => ["Ruby"]
```
