Skip to content

Commit

Permalink
Add gem status;
Browse files Browse the repository at this point in the history
  • Loading branch information
huacnlee committed Sep 23, 2013
1 parent 547cd92 commit 44d7e25
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Mongoid Taggable provides some helpers to create taggable documents, can use man

## Status

[![CI Status](https://secure.travis-ci.org/huacnlee/mongoid_taggable_on.png)](http://travis-ci.org/huacnlee/mongoid_taggable_on)
- [![Gem Version](https://badge.fury.io/rb/mongoid_taggable_on.png)](https://rubygems.org/gems/mongoid_taggable_on)
- [![CI Status](https://api.travis-ci.org/huacnlee/mongoid_taggable_on.png)](http://travis-ci.org/huacnlee/mongoid_taggable_on)

## Installation

Expand All @@ -22,7 +23,7 @@ gem 'mongoid_taggable_on'

## Usage

[中文介绍去这里](http://huacnlee.com/blog/new_gem_mongoid_taggable_on)
[中文介绍去这里](http://huacnlee.com/blog/new_gem_mongoid_taggable_on)

```ruby
class Movie
Expand All @@ -32,12 +33,12 @@ class Movie
taggable_on :actors, :index => false
taggable_on :directors
taggable_on :countries

field :title
field :summary
end
```

Now you can use sample:

```bash
Expand All @@ -49,19 +50,19 @@ irb> m.country_list = "United States| China|Mexico"
irb> m.countries
["United States","China","Mexico"]
```

find with tag:

```bash
irb> Movie.tagged_with_on(:actors, "Jason Statham, Joseph Gordon-Levitt")
irb> Movie.tagged_with_on(:actors, "Jason Statham, Joseph Gordon-Levitt", :match => :any)
irb> Movie.tagged_with_on(:actors, "Nicolas Cage", :match => :not)
irb> Movie.tagged_with_on(:actors, "Nicolas Cage", :match => :not)
```

## Allow split chars

, ,| /

## Who used that?

In [720p.so](http://720p.so), the Movie actors, directors, languages, countries, tags all base in mongoid\_taggable\_on.

0 comments on commit 44d7e25

Please sign in to comment.