Skip to content

aaronbullard/rails-filters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Filters

This is a helper class to translate a string of filters into usable sql to modify active record queries.

Example query:

  • ?filters=status==verified,age>18,weight>=<150;200

This query translates to:

  • WHERE status = 'verified'
  • AND age > 18
  • AND weight BETWEEN 150 AND 200

Usage

See the tests for usage and examples /spec/filters_spec.rb

Installation

Add this line to your application's Gemfile:

gem 'filters'

And then execute:

$ bundle

Or install it yourself as:

$ gem install filters

License

The gem is available as open source under the terms of the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages