README.md in season-0.0.5 vs README.md in season-0.0.6

- old
+ new

@@ -5,11 +5,11 @@ ## Installation Add this line to your application's Gemfile: ```ruby -gem 'season', '~> 0.0.5' +gem 'season', '~> 0.0.6' ``` And then execute: $ bundle @@ -27,28 +27,37 @@ Season assumes your models have timestamps columns (created_at and updated_at) and uses these to do its magic. Right now, Season gives you the following helper methods: ```ruby -# You can pass instances of Time/DateTime/String as arguments +# Include it in your models class User < ActiveRecord::Base include Season::Scopes ... end # And then use it as: +# (Time/DateTime/String instances are allowed as arguments) User.created_before(Time.now) User.created_after(DateTime.now) User.created_between(Time.now - 1.week, '31-01-2015') User.updated_before(DateTime.now) User.updated_after('01-01-2015') User.updated_between(Time.now - 1.week, Time.now) ``` + +They are chainable, so you can also do things like this: +```ruby + +User.where(id: [1, 2, 3]).created_before(Time.now) +User.updated_after('01-01-2015').order(created_at: :asc) +``` + ## Configuration The scopes are not included by default in your models. To use them you need to include it yourself: