Jamie Hill
Not a member
Jamie Hill's latest activity
Wednesday, January 06 2010
-
Jamie Hill commented at 8:00 PMRight, think we're there. Attached is new patch which instead of referencing columns, validates_with looks to see if a setter instance method is already availab...
Tuesday, January 05 2010
-
-
Jamie Hill commented at 11:57 PMAll I have done is move that logic from the validates_acceptance_of method which it should really be in either. As mentionned above I don't thing validations sh...
-
Jamie Hill commented at 10:50 AMJust noticed an error when running on 1.8.7, attaching new patch file.
-
Jamie Hill commented at 9:49 AMI am attaching a new diff of what I believe to be an elegant solution to the whole attr_accessor problem.
I have moved the remaining logic into Validator classe...
Sunday, January 03 2010
-
Jamie Hill commented at 5:56 PMSorry, that first code snippet was wrong, should be:
%w(presence length numericality etc).each do |validation| define_method "validates_#{validation}_of",... -
Jamie Hill commented at 5:54 PMI see what you mean about the attr_accessor. I think ideally that validations shouldn't magically add methods to the model and instead you should be expected to...
-
Jamie Hill commented at 4:06 PMAgreed on the Validator abstract class, I couldn't initially see a use for it but may be useful in some circumstances.
As for the entry point being via the vali...
-
Jamie Hill commented at 4:01 AMGreat news, thanks for your help on this.
I am attaching a new patch that address your concerns by working by convention as suggested by Josh. I have also publi...
Saturday, December 05 2009
-
- Tag changed from 2.3, activerecord, bug, default_scope, named_scope, patch, verified to 2.3, 2.3.5, activerecord, bug, default_scope, named_scope, patch, verified
Sorry to resurrect an old ticket but this is definitely still an issue, default_scope becomes pretty much unusable without being able to override the :order etc...