/mongoid-textile

Textile texts directly from MongoDB

Primary LanguageRubyMIT LicenseMIT

Mongoid Textile

Build Status Dependency Status Gem Version Coverage Status Code Climate

Textile texts directly from MongoDB.

Mongoid Textile caches Textile texts on MongoDB to eliminate reprocessing.

Installation

Add this line to your application's Gemfile:

gem 'mongoid-textile'

And then execute:

bundle

Or install it yourself as:

gem install mongoid-textile

Usage

class Article
  include Mongoid::Document
  include Mongoid::Textile

  field :text

  textlize :text
end

article = Article.create(text: 'h1. Proud to be a rails developer')

article.text_formatted #=> <h1>Proud to be a rails developer</h1>

Compatibility

Mongoid Textile is tested against Ruby 1.9.3, 2.0.0 and 2.1.0.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Maintainers

License

MIT License. Copyright 2012-2014 Lucas Renan e Tiago Rafael Godinho