aboutsummaryrefslogtreecommitdiffstats
path: root/railties/doc
diff options
context:
space:
mode:
authorCassioMarques <cassiommc@gmail.com>2008-12-28 22:56:51 -0200
committerCassioMarques <cassiommc@gmail.com>2008-12-28 22:56:51 -0200
commita1f22f520b7b189b2d9f756fcff32093ea68fffd (patch)
tree99d9e8ce6ee9286e178b13825aef6025b47e685c /railties/doc
parent006a640fc4dff5a7a0ea471fb904dd27068b6545 (diff)
downloadrails-a1f22f520b7b189b2d9f756fcff32093ea68fffd.tar.gz
rails-a1f22f520b7b189b2d9f756fcff32093ea68fffd.tar.bz2
rails-a1f22f520b7b189b2d9f756fcff32093ea68fffd.zip
Added missing images for the AR validations and callbacks guide
Diffstat (limited to 'railties/doc')
-rw-r--r--railties/doc/guides/html/activerecord_validations_callbacks.html2
-rw-r--r--railties/doc/guides/source/activerecord_validations_callbacks.txt2
-rw-r--r--railties/doc/guides/source/images/customized_error_messages.pngbin0 -> 5055 bytes
-rw-r--r--railties/doc/guides/source/images/error_messages.pngbin0 -> 8440 bytes
-rw-r--r--railties/doc/guides/source/images/validation_error_messages.pngbin0 -> 1107 bytes
5 files changed, 2 insertions, 2 deletions
diff --git a/railties/doc/guides/html/activerecord_validations_callbacks.html b/railties/doc/guides/html/activerecord_validations_callbacks.html
index a5356f3daf..34d911b9e2 100644
--- a/railties/doc/guides/html/activerecord_validations_callbacks.html
+++ b/railties/doc/guides/html/activerecord_validations_callbacks.html
@@ -1013,7 +1013,7 @@ http://www.gnu.org/software/src-highlite -->
</li>
</ul></div>
<h3 id="_changing_the_way_form_fields_with_errors_are_displayed">8.1. Changing the way form fields with errors are displayed</h3>
-<div class="paragraph"><p>By default, form fields with errors are displayed enclosed by a <tt>div</tt> element with the <tt>fieldWithErrors</tt> CSS class. However, we can write some Ruby code to override the way Rails treats those fields by default. Here is a simple example where we change the Rails behaviour to always display the error messages in front of each of the form fields with errors. The error messages will be enclosed by a <tt>span</tt> element with a <tt>validation-error</tt> CSS class.</p></div>
+<div class="paragraph"><p>By default, form fields with errors are displayed enclosed by a <tt>div</tt> element with the <tt>fieldWithErrors</tt> CSS class. However, we can write some Ruby code to override the way Rails treats those fields by default. Here is a simple example where we change the Rails behaviour to always display the error messages in front of each of the form fields with errors. The error messages will be enclosed by a <tt>span</tt> element with a <tt>validation-error</tt> CSS class. There will be no <tt>div</tt> element enclosing the <tt>input</tt> element, so we get rid of that red border around the text field. You can use the <tt>validation-error</tt> CSS class to style it anyway you want.</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight 2.9
by Lorenzo Bettini
diff --git a/railties/doc/guides/source/activerecord_validations_callbacks.txt b/railties/doc/guides/source/activerecord_validations_callbacks.txt
index f539aface0..94a8b215b5 100644
--- a/railties/doc/guides/source/activerecord_validations_callbacks.txt
+++ b/railties/doc/guides/source/activerecord_validations_callbacks.txt
@@ -588,7 +588,7 @@ It's also possible to change the CSS classes used by the +error_messages+ helper
=== Changing the way form fields with errors are displayed
-By default, form fields with errors are displayed enclosed by a +div+ element with the +fieldWithErrors+ CSS class. However, we can write some Ruby code to override the way Rails treats those fields by default. Here is a simple example where we change the Rails behaviour to always display the error messages in front of each of the form fields with errors. The error messages will be enclosed by a +span+ element with a +validation-error+ CSS class.
+By default, form fields with errors are displayed enclosed by a +div+ element with the +fieldWithErrors+ CSS class. However, we can write some Ruby code to override the way Rails treats those fields by default. Here is a simple example where we change the Rails behaviour to always display the error messages in front of each of the form fields with errors. The error messages will be enclosed by a +span+ element with a +validation-error+ CSS class. There will be no +div+ element enclosing the +input+ element, so we get rid of that red border around the text field. You can use the +validation-error+ CSS class to style it anyway you want.
[source, ruby]
------------------------------------------------------------------
diff --git a/railties/doc/guides/source/images/customized_error_messages.png b/railties/doc/guides/source/images/customized_error_messages.png
new file mode 100644
index 0000000000..fa676991e3
--- /dev/null
+++ b/railties/doc/guides/source/images/customized_error_messages.png
Binary files differ
diff --git a/railties/doc/guides/source/images/error_messages.png b/railties/doc/guides/source/images/error_messages.png
new file mode 100644
index 0000000000..32de1cac21
--- /dev/null
+++ b/railties/doc/guides/source/images/error_messages.png
Binary files differ
diff --git a/railties/doc/guides/source/images/validation_error_messages.png b/railties/doc/guides/source/images/validation_error_messages.png
new file mode 100644
index 0000000000..622d35da5d
--- /dev/null
+++ b/railties/doc/guides/source/images/validation_error_messages.png
Binary files differ