Textile texts directly from MongoDB.
Mongoid Textile caches Textile texts on MongoDB to eliminate reprocessing.
Add this line to your application's Gemfile
:
gem 'mongoid-textile'
And then execute:
bundle
Or install it yourself as:
gem install mongoid-textile
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>
Mongoid Textile is tested against Ruby 1.9.3, 2.0.0 and 2.1.0.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
- Lucas Renan (https://github.com/lucasrenan)
- Tiago Godinho (https://github.com/tiagogodinho)
MIT License. Copyright 2012-2014 Lucas Renan e Tiago Rafael Godinho