diff options
author | sonnym <michaud.sonny@gmail.com> | 2014-07-17 17:02:54 -0400 |
---|---|---|
committer | sonnym <michaud.sonny@gmail.com> | 2014-07-17 17:32:28 -0400 |
commit | 0950d409b041415f13d037aa4293ac31f97ed236 (patch) | |
tree | 3145a5374af27d105bc7c23115a274cfd476b9b6 /activemodel/lib/active_model/gem_version.rb | |
parent | 932386be8a9c0f60c7bb078261c5433aeccb3284 (diff) | |
download | rails-0950d409b041415f13d037aa4293ac31f97ed236.tar.gz rails-0950d409b041415f13d037aa4293ac31f97ed236.tar.bz2 rails-0950d409b041415f13d037aa4293ac31f97ed236.zip |
check for valid options in validate method
This change prevents a certain class of user error which results when
mistakenly using the `validate` class method instead of the `validates`
class method.
Only apply when all arguments are symbols, because some validations use
the `validate` method and pass in additional options, namely the
`LenghValidator` via the `ActiveMode::Validations::validates_with`
method.
Diffstat (limited to 'activemodel/lib/active_model/gem_version.rb')
0 files changed, 0 insertions, 0 deletions