rails_param
rails_param copied to clipboard
Add custom message support
I have extracted each message into a separate class that extends a base class.
The validation method tries to use the user message class, if is not present it fallbacks to the rails_param default messages
I like the idea of having a custom message option, but the refactoring looks too much convoluted to me (and very much Java-like...).
Moreover, we're planning a refactoring of validations based on ActiveModel so I'll come back to this after we're done with that.