0.0
No commit activity in last 3 years
No release in over 3 years
Add `or` functionality to models that support AREL to query statuses.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10
~> 10.0
~> 3.3

Runtime

~> 4.2
~> 0.1
 Project Readme

Build Status

StatusQuerier

StatusQuerier gives the ability to safely combine scopes with or method given by the where-or gem. It restricts the scopes to the allowable 6 types. pending, preview, live, expired, invalid, and disabled.

Installation

Add this line to your application's Gemfile:

gem 'status_querier'

And then execute:

$ bundle

Or install it yourself as:

$ gem install status_querier

Usage

To use, copy the following into your model.

include StatusQuerier::Querier

And now you can call Model.with_any_statuses(['preview', 'live'])

Development

After checking out the repo, run bundle to install dependencies. Then, run rake spec to run the tests.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/westfield/status_querier.