On Thu, 24 Feb 2005 10:09:21 -0600, Beau O''Hara
<bohara-Ani+Op4kYNUXWzRTk0ed69BPR1lH4CV8@public.gmane.org>
wrote:>
> Is there a way to handle referential integrity through active record? For
> example I want to offer users the ability to delete categories but only if
> there is no information associated with it.
Just check for associations in the Category#before_destroy callback.
http://ar.rubyonrails.com/classes/ActiveRecord/Callbacks.html
--
Regards,
John Wilger
-----------
Alice came to a fork in the road. "Which road do I take?" she asked.
"Where do you want to go?" responded the Cheshire cat.
"I don''t know," Alice answered.
"Then," said the cat, "it doesn''t matter."
- Lewis Carrol, Alice in Wonderland