-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added support for custom filtering functions. #1
Conversation
I'll leave it here for the time being. This would need better tests and some info in the Readme.md before pulling. For someone who is thinking of using the plugin. This patch allows to add custom filtering functions in initializers. Quite handy for sanitizing html, some specific numbers, etc. I guess example would be something like:
|
@dadittoz if you have better examples etc. You could include those in the Readme.md after current examples and make some tests for those custom validators. Otherwise I'll pull when I need that feature for myself for the first time :) |
… tests pass in ruby 1.9
Looks like that's it. Let me know if you anything else should be added. |
Added support for custom filtering functions.
Added some tests Some minor fixes in the class Related to #1
Cool, thanks for the patch. I did some minor things: :nullify is now with so that tests go right with both ruby 1.9 and 1.8.7. Also bit more tests included. I bumpt version to 2.0 and added info to readme about versions (and reference to this pull request/issue). New version is in rubygems. |
I didn't add any tests for configuration. Existing tests pass correctly. Pull it if you like.