Hi all,

There was a question recently on the Rails ML that asked for basically a database restrict.

If an object has_many somethings and there are children somethings, don't allow that object to be destroyed.

I have a couple of questions about this.

1. Is having this as an option for :dependent a good idea? 

2. Assuming that it is a reasonable thing to have, how do I go about
  a. writing a test for the patch
 
  b. submitting a patch, (I'm on windows)

I have found the code in active record to make the change, downloaded the source and got the standard tests working, but I have no idea of what test to write to confirm it works. 

Do I write a seperate class with the option included?  I really have no idea, very noob at this.

Any pointers would be appreciated.

Cheers

Daniel
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to