search for: approval_status

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

2006 May 16
2
Validate Before Delete
...t the status of the Order is not completed before it is allowed to be deleted. I tried the following method in my Model, but it appears that this only works for an :update or :create on the record. Anyone know how to do this, and if it should be in the model or the controller? validates_each :approval_status do |record, attr, value| record.errors.add attr, ''Order Is Completed'' if value == "Completed" end -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060516/ae24ac93/attachme...