2. Assuming that it is a reasonable thing to have, how do I go about
a. writing a test for the patch
You mean that as "where do I put my tests?" or "what do I test for?"
If the former, look around the existing tests, see if it fits within
any, otherwise create a new test file. If the latter, create a record
with associated records and one without them. Try to destroy each.
Test that one raised an error (or returned false, depends on how you
implement it), and that the other was destroyed.
b. submitting a patch, (I'm on windows)
Can you redirect output in the windows shell? I think so, not sure.
Anyway, get the svn command line tools, open cmd, go to the rails
working copy where you made the changes, and type:
svn diff > myfile.diff
Then attach the generated file to a ticket in trac (which probably is
not working yet, so just post it here)
You should make the change on a subversion working copy of the rails
source, not on an unversioned copy. Also, if you add any new files,
be sure to `svn add` them.
Do I write a seperate class with the option included? I really
have no idea, very noob at this.
You mean for the actual change or the tests?
change: You should probably alter the code that handles the dependent
attribute in place.
tests: see above.
If you're not sure about the quality of the final patch, post it here
and we'll go over it.
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core