Hello, I am using the before_destroy. If i meet a condition i want to
abort the delete is there a way to do this in the before destroy to void
the deleting of a record?
Thanks
Hi –
On Wed, 15 Aug 2007, Jack S. wrote:
Hello, I am using the before_destroy. If i meet a condition i want to
abort the delete is there a way to do this in the before destroy to void
the deleting of a record?
“If a before_* callback returns false, all the later callbacks and the
associated action are cancelled.”
(from the API docs for callbacks)
David
–
- Books:
RAILS ROUTING (new! http://www.awprofessional.com/title/0321509242)
RUBY FOR RAILS (Ruby for Rails) - Ruby/Rails training
& consulting: Ruby Power and Light, LLC (http://www.rubypal.com)