search for: after_validat

Displaying 1 result from an estimated 1 matches for "after_validat".

2012 May 26
2
before_create is after_validatation :on => :create , when it should be before_validation :on => :create
...ck are called after the validation, but before the model is created. This was an intentional design decision, but I think it was the wrong one. What do you think? When I think of before_create, I think of before_validation :foo, :on => :create, but, by default, before_create is synonymous with after_validation :foo, :on => :create`, which is technically correct, but confusing. Most of the goal of convention over configuration is to have sane defaults, right? Wouldn''t following that principle include favoring what makes the most sense at first thought, over a technicality? And, I''...