userstamp icon indicating copy to clipboard operation
userstamp copied to clipboard

creator not set until after validation

Open jmccaffrey opened this issue 15 years ago • 0 comments

Is there any reason why the stamper couldn't be set before validations?

I have a case where I want to ensure that a creator doesn't already have an object, but the creator id doesn't get set until after validations.

I changed stampable.rb to have before_validation :set_updater_attribute before_validation_on_create :set_creator_attribute

Is there a reason why this is a bad idea? (sorry if this covered in a google group already)

jmccaffrey avatar Feb 25 '10 22:02 jmccaffrey