search for: validate_on_destroy

Displaying 2 results from an estimated 2 matches for "validate_on_destroy".

2006 Dec 07
2
validate_on_destroy ?
What''s the best way to validate_on_destroy. Rails only seems to include validate_on_create and validate_on_update methods. I don''t want to resort to doing: before_destroy do |j| raise "There is an error" if j.etc end Is there a way of finding out what action (create/update/destroy) is being performed if I use the '...
2005 May 08
1
"validation" on destroy
I''m building a little application with Rails, and I''m becoming a huge fan of the validations in ActiveRecord. Recently, though I ran into a problem which to me feels like a job for Validations, but I can''t see a way to use them. My model consits of a Trade object, which represents either buying or selling some security. I need to require that at no point has a user