Date Supercharger

A nice shortcut for date queries.

date_supercharger adds _after, _after_or_at, _before and _before_or_at methods to every date/datetime field of Active Record models.

Build Status Code Climate Test Coverage

Usage

Visit.created_at_after(DateTime.now)

instead of

Visit.where("created_at > ?",DateTime.now)

Installation

Add this line to your application’s Gemfile:

gem 'date_supercharger'

And then execute:

bundle

History

View the changelog

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help: