validates_acceptance_of behavior in Rails 2.0
I noticed that when upgrading to Rails 2.0, my validates_acceptance_of started failing (or rather, it started telling me that my field was not accepted when the param being passed was ‘1′). Apparently I had to add the :accept => true to make it work. I discovered this by reading the Rails source, where it mentions that database columns will be converted to true/false so you must have this if you’re validating on a real database column
validates_acceptance_of :terms_of_service, :allow_nil => false, :accept => true










No Comments Yet