jnunemaker-validatable removes the "on" param from validates_acceptance_of
I have the jnunemaker-validatable gem by virtue of the fact that I'm using mongo-mapper, and I find that I can not use the :on param for the validates_acceptance_of helper. It dies with:
ArgumentError: invalid options: on
from /opt/local/lib/ruby/gems/1.8/gems/jnunemaker-validatable-1.8.4/lib/validatable/understandable.rb:27:in `must_understand'
from /opt/local/lib/ruby/gems/1.8/gems/jnunemaker-validatable-开发者_如何学JAVA1.8.4/lib/validatable/validations/validation_base.rb:47:in `initialize'
from /opt/local/lib/ruby/gems/1.8/gems/jnunemaker-validatable-1.8.4/lib/validatable/validatable_class_methods.rb:66:in `new'
from /opt/local/lib/ruby/gems/1.8/gems/jnunemaker-validatable-1.8.4/lib/validatable/validatable_class_methods.rb:66:in `add_validations'
from /opt/local/lib/ruby/gems/1.8/gems/jnunemaker-validatable-1.8.4/lib/validatable/validatable_class_methods.rb:65:in `each'
from /opt/local/lib/ruby/gems/1.8/gems/jnunemaker-validatable-1.8.4/lib/validatable/validatable_class_methods.rb:65:in `add_validations'
from /opt/local/lib/ruby/gems/1.8/gems/jnunemaker-validatable-1.8.4/lib/validatable/macros.rb:119:in `validates_acceptance_of'
Any ideas? Anyone have a workaround? I would send this question to the project, but I can't find a way to interact with it (no forum/bugtracker/etc).
Thanks! Tom
I would suggest upgrading to mongomapper v0.9.1 which it uses ActiveRecord::Validations rather than the Validatable gem that doesn't support the :on option.
If you want to interact with the project, you might consider asking on the mongomapper google group: http://groups.google.com/group/mongomapper or possibly just filing a bug in the validatable gem github project: https://github.com/jnunemaker/validatable however I'd expect you'd get a similar response urging you to upgrade to the latest version of MongoMapper.
精彩评论