Erik Peterson
Not a member
Erik Peterson's latest activity
Tuesday, May 05 2009
750
Keeping track of validations with a hash
was updated
in Ruby on Rails
-
Erik Peterson commented at 4:18 PMI hadn't been following up because there were a couple of projects out there to refactor Rails validations in a much more major way, and I didn't want to step o...
Monday, August 04 2008
750
Keeping track of validations with a hash
was updated
in Ruby on Rails
-
Erik Peterson commented at 9:55 PMI had originally thought that keeping track of options would require a complete OO approach, with Validation objects and all sorts of nastiness that isn't real...
Sunday, August 03 2008
750
Patch: ActiveRecord#required_attributes
was updated
in Ruby on Rails
-
Erik Peterson commented at 6:38 PMSorry about that, apparently I can't read the formatting instructions:
class Person < ActiveRecord::Base validates_uniqueness_of :name validates_presenc... -
- Tag changed from activerecord, enhancement, patch to activerecord, enhancement, patch, tested
Ok, here's a patch that keeps track of validations in a hash of arrays. It is tested and documented.
Usage:
-
Erik Peterson commented at 3:23 PM+1 for the idea, but I'm not sure that I like this implementation.
I think we generally need some way of looking at what validations are on a model. However,...