Acts_as_filterable is a project mainly written in Ruby, based on the MIT license.
filter attributes, in different ways...
= acts_as_filterable
acts_as_filterable is a plugin that was hacked together (originally a monkey patch) to avoid repeating the same text filtering logic that was re-implemented all over the place in a legacy domain model.
== Background
You might ask why we just didn't convert the column value. That would be the right way to go but with tens of millions of rows and numerous legacy apps that expect the data to be a character string; the alternative seemed much more appealing for the time being :). So putting this in place would avoid the garbage data coming in moving forward and assure that the logic is implemented in a sane (and re-usable) way. Hopefully someone else can find a use for it as well...
== Default filters in place:
Features I'd like to add in the future:
= Runtime Dependencies
= Install
== Rails 2.3
config.gem "acts_as_filterable"
== Rails 3 / Bundler
gem "acts_as_filterable", "0.3.0"
== RubyGems
gem install acts_as_filterable --source http://rubygems.org
== Regular Library install
ruby setup.rb install
= Usage
class MyModel < ActiveRecord::Base filter_for_digits :phone_number, :fax_number end
== Custom Filters
in your config/initializers/acts_as_filterable.rb
ActsAsFilterable.configure do |config| config.add_filter :foo do |value|
end
end
= Contributing
If something is broken or you need a feature; you know the deal. Don't be part of the problem. Patches or pull requests are welcome.
== Copyright
Copyright (c) 2010 Rob Ares. See LICENSE for details.