Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Read message value directly from options
**Why**: With the changes in PR #139, specifying a symbolized value for the `message` option would cause that method to be called on the Model object. If that method didn't exist, it resulted in a `NoMethodError` exception. If that method did exist in the Model, and also as an i18n key, then the Model method was used, as opposed to the i18n key. The `message` option is meant to either be a String, or a symbol corresponding to an i18n key. Therefore, it should be read directly from `options[:message]` and not sent for further processing by the `options_value` method. **How**: - Revert the `error_message` method back to its value prior to PR #139, so that it uses `options[:message]` - Add 3 new specs to cover these scenarios
- Loading branch information
Showing
2 changed files
with
60 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters