Skip to content

Taxonomies

sh
rails g trek:taxonomies

Sets up a tagging & categorization system:

Once installed, make any model taggable with the Trek::Taggable concern:

ruby
class Article < ApplicationRecord
  include Trek::Taggable
end

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

Released under the MIT License.