aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2009-03-08 22:42:36 +0100
committerXavier Noria <fxn@hashref.com>2009-03-08 22:42:36 +0100
commitfc098e8de93e61ba8d3ac462a43bfc548357765a (patch)
treec55cf146c079f25d5c72a05d06c5bcb5bd5dab2f /railties/guides/source
parentf4b9de8abfab738ef5bdfb6fe8fb324cf59bd6f4 (diff)
downloadrails-fc098e8de93e61ba8d3ac462a43bfc548357765a.tar.gz
rails-fc098e8de93e61ba8d3ac462a43bfc548357765a.tar.bz2
rails-fc098e8de93e61ba8d3ac462a43bfc548357765a.zip
yet some more deprecated :message formats updated
Diffstat (limited to 'railties/guides/source')
-rw-r--r--railties/guides/source/activerecord_validations_callbacks.textile10
1 files changed, 5 insertions, 5 deletions
diff --git a/railties/guides/source/activerecord_validations_callbacks.textile b/railties/guides/source/activerecord_validations_callbacks.textile
index 1b108190a9..b0e52e8be1 100644
--- a/railties/guides/source/activerecord_validations_callbacks.textile
+++ b/railties/guides/source/activerecord_validations_callbacks.textile
@@ -234,11 +234,11 @@ This helper validates that the attributes' values are not included in a given se
<ruby>
class Account < ActiveRecord::Base
validates_exclusion_of :subdomain, :in => %w(www),
- :message => "Subdomain %s is reserved."
+ :message => "Subdomain {{value}} is reserved."
end
</ruby>
-The +validates_exclusion_of+ helper has an option +:in+ that receives the set of values that will not be accepted for the validated attributes. The +:in+ option has an alias called +:within+ that you can use for the same purpose, if you'd like to. This example uses the +:message+ option to show how you can include the attribute's value using the +%s+ format specification.
+The +validates_exclusion_of+ helper has an option +:in+ that receives the set of values that will not be accepted for the validated attributes. The +:in+ option has an alias called +:within+ that you can use for the same purpose, if you'd like to. This example uses the +:message+ option to show how you can include the attribute's value.
The default error message for +validates_exclusion_of+ is "_is not included in the list_".
@@ -262,11 +262,11 @@ This helper validates that the attributes' values are included in a given set. I
<ruby>
class Coffee < ActiveRecord::Base
validates_inclusion_of :size, :in => %w(small medium large),
- :message => "%s is not a valid size"
+ :message => "{{value}} is not a valid size"
end
</ruby>
-The +validates_inclusion_of+ helper has an option +:in+ that receives the set of values that will be accepted. The +:in+ option has an alias called +:within+ that you can use for the same purpose, if you'd like to. The previous example uses the +:message+ option to show how you can include the attribute's value using the +%s+ format specification.
+The +validates_inclusion_of+ helper has an option +:in+ that receives the set of values that will be accepted. The +:in+ option has an alias called +:within+ that you can use for the same purpose, if you'd like to. The previous example uses the +:message+ option to show how you can include the attribute's value.
The default error message for +validates_inclusion_of+ is "_is not included in the list_".
@@ -428,7 +428,7 @@ The +:allow_nil+ option skips the validation when the value being validated is +
<ruby>
class Coffee < ActiveRecord::Base
validates_inclusion_of :size, :in => %w(small medium large),
- :message => "%s is not a valid size", :allow_nil => true
+ :message => "{{value}} is not a valid size", :allow_nil => true
end
</ruby>