skwpspace yan pritzker’s home on the web

skwpspace is Yan Pritzker's home on the web

Blog :: Photography :: About Me

hello, i'm yan

This blog is about startups, blogging, Ruby On Rails, virtualization and cloud computing, photography, customer service, marketing, ux and design, git, and lots more.

Get updates by email
Follow me on twitter

Top Posts

planypus

I'm the founder of Planypus, the place to share your plans!

cohesiveft

Accessible, manageable, virtualized application stacks ready to download or deploy to the cloud!

flickr

at the paradeat the parade@slava626@leorazellman and @smazo at bat17my poor ricohyou're wearing my sweaterthe graduatethe answer, my friend

Archives

Contact

Reach me at yan at pritzker.ws

Posted
21 February 2008 @ 6pm

Tagged
RubyOnRails

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


There are no comments yet. You could be the first!

Leave a Comment

Introducing Elastic Server On Demand Yahoo search broken for ‘planypus’