search for: before_destory

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

2006 Jun 29
1
before_destroy & verification
Hey, probably an easy question but, I''m trying to get a method to run "before_destory" for a model, and I want the method to throw an error, and not delete the object from the database, if a certain condition is held Obviously, I can just raise an error and rescue it... but for some reason I can''t get <% error_messages_for ''model" %> to catch an...
2008 Jul 04
2
How do change catalog before catalog is delted?
...own normal,for it''s catalog is no existed. Now I want to create(if the ''Defalut catalog'' is not existed) a ''Defalut catalog'' in catalogs table,and make the posts''s catalog belongs to it,before I delete a catalog. I just know there is ''before_destory'' in ActiveRecord.But I don''t know how to do it. Thanks for any replies. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" grou...