README.md in mongoid-time_range-0.1.0 vs README.md in mongoid-time_range-0.2.0

- old
+ new

@@ -8,16 +8,10 @@ ```ruby gem 'mongoid-time_range' ``` -If you want to use ::TimeRange instead of Mongoid::TimeRange, your Gemfile must include a additional require statement: - -```ruby -gem 'mongoid-time_range', require: 'mongoid/time_range/global' -``` - ## Usage ```ruby class Document include Mongoid::Document @@ -30,9 +24,25 @@ document = Document.create document.range # => { from: 2013-01-01 00:00:00 +0100, to: nil } year2013 = Document.create(range: { from: Time.now.at_beginning_of_year, to: Time.now.end_of_year }) year2013.range # => { from: 2013-01-01 00:00:00 +0100, to: 2013-12-31 23:59:59 +0100 } +``` + +If you want to use `TimeRange` directly instead of `Mongoid::TimeRange`: + +```ruby +class Document + include Mongoid::Document + + field :range, type: TimeRange +end +``` + +… your Gemfile must include a additional require statement: + +```ruby +gem 'mongoid-time_range', require: 'mongoid/time_range/global' ``` ## Contributing 1. Fork it