{"id":15663301,"url":"https://github.com/huacnlee/mongoid_taggable_on","last_synced_at":"2025-05-05T23:07:06.751Z","repository":{"id":2787044,"uuid":"3786861","full_name":"huacnlee/mongoid_taggable_on","owner":"huacnlee","description":"Taggable on custom fields for Mongoid","archived":false,"fork":false,"pushed_at":"2019-07-16T02:47:37.000Z","size":39,"stargazers_count":17,"open_issues_count":1,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-05T23:07:00.647Z","etag":null,"topics":["mongodb","mongoid","mongoid-plugin","rails","tag","tagging"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"hparton/housekeeping","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/huacnlee.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-03-21T13:45:13.000Z","updated_at":"2023-11-05T13:32:18.000Z","dependencies_parsed_at":"2022-08-20T07:31:46.851Z","dependency_job_id":null,"html_url":"https://github.com/huacnlee/mongoid_taggable_on","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huacnlee%2Fmongoid_taggable_on","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huacnlee%2Fmongoid_taggable_on/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huacnlee%2Fmongoid_taggable_on/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huacnlee%2Fmongoid_taggable_on/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/huacnlee","download_url":"https://codeload.github.com/huacnlee/mongoid_taggable_on/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252590609,"owners_count":21772937,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mongodb","mongoid","mongoid-plugin","rails","tag","tagging"],"created_at":"2024-10-03T13:36:32.283Z","updated_at":"2025-05-05T23:07:06.733Z","avatar_url":"https://github.com/huacnlee.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mongoid Taggable On\n\nMongoid Taggable provides some helpers to create taggable documents, can use many fields.\n\n## Status\n\n[![CI Status](https://api.travis-ci.org/huacnlee/mongoid_taggable_on.svg)](http://travis-ci.org/huacnlee/mongoid_taggable_on) [![Gem Version](https://badge.fury.io/rb/mongoid_taggable_on.svg)](https://rubygems.org/gems/mongoid_taggable_on)\n\n## Installation\n\nYou can simple install from rubygems:\n\n```bash\ngem install mongoid_taggable_on\n```\n\nor in Gemfile:\n\n```rb\ngem \"mongoid_taggable_on\"\n```\n\n## Usage\n\n\n```ruby\nclass Movie\n  include Mongoid::Document\n  include Mongoid::TaggableOn\n\n  taggable_on :actors, index: false\n  taggable_on :directors\n  taggable_on :countries\n\n  field :title\n  field :summary\nend\n```\n\nNow you can use sample:\n\n```bash\nirb\u003e movie = Movie.new\nirb\u003e movie.actor_list = \"Jason Statham, Joseph Gordon-Levitt, Johnny Depp, Nicolas Cage\"\nirb\u003e movie.actors\n[\"Jason Statham\", \"Joseph Gordon-Levitt\", \"Johnny De\", \"Nicolas Cage\"]\n\nirb\u003e movie.country_list = \"United States| China|Mexico\"\nirb\u003e movie.countries\n[\"United States\", \"China\",\"Mexico\"]\n```\n\nfind with tag:\n\n```bash\nirb\u003e Movie.tagged_with_on(:actors, \"Jason Statham, Joseph Gordon-Levitt\")\nirb\u003e Movie.tagged_with_on(:actors, \"Jason Statham, Joseph Gordon-Levitt\", match: :any)\nirb\u003e Movie.tagged_with_on(:actors, \"Nicolas Cage\", match: :not)\n```\n\n## Allow split chars\n\n```\n, ，| /\n```\n\n## Who used that?\n\nIn [720p.so](http://720p.so), the Movie actors, directors, languages, countries, tags all base in mongoid\\_taggable\\_on.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuacnlee%2Fmongoid_taggable_on","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhuacnlee%2Fmongoid_taggable_on","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuacnlee%2Fmongoid_taggable_on/lists"}