I've done some experiment writing a patch to support a full_message 
option on Rails validations, as can be seen here:

http://groups.google.com/group/rubyonrails-core/msg/5bf5c89330805373

I would like to finish the patch, writing the documentation and tests 
and submit it to Lighthouse.

But I don't know how to proceed with documentation, since it is not very 
DRY...

Should I send a description to appreciation and then copy and paste it 
on every validation method?

If so, would the following description be ok?

"Configuration options:
 * <tt>message</tt> - A custom error message (default is: "can't be 
blank"). <tt>full_message</tt> can
be specified instead, in which case the humanized attribute name won't 
be prepended to the message.
You have to choose between either <tt>message</tt> or 
<tt>full_message</tt>, not both. If that happens,
<tt>full_message</tt> takes precedence.
..."

The only difference between validations would be the default...


Regarding test writing, I would also ask for some guidance on it.

I've noted that not all options are tested on each validation respective 
test.

So, I would like to know if I should add a test on with_validations_test.rb,
add a new test file or add a new test for every validation class.

Please, how should I proceed?

Thanks in advance,

Rodrigo.

--

You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to rubyonrails-c...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-core+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.


Reply via email to