source code for update filter gem
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
.gitignore
Gemfile
README
Rakefile
update_filter.gemspec

README

This gem provides before_update_filter and after_update_filter method for active record class

Syntax :

before_update_filter :callback_method, :or_params => [:attr1, :attr2], :and_params = > [:attr3, :attr4]

after_update_filter :callback_method, :or_params => [:attr1, :attr2], :and_params = > [:attr3, :attr4]

or_params and and_params are optional. 

If any of or_params attribute is updated then then callabck method will be called.

If all attributes of and_params is updated only then callback method will be called .