diff options
author | Jaime Iniesta <jaimeiniesta@gmail.com> | 2010-07-20 18:17:29 +0200 |
---|---|---|
committer | Jaime Iniesta <jaimeiniesta@gmail.com> | 2010-07-20 18:17:29 +0200 |
commit | 6914d67ed15d41a239407e3c724b670d95a740a6 (patch) | |
tree | 667c2c1a0310eee5606572fdd3a35af3583af703 /railties/guides/source/active_record_validations_callbacks.textile | |
parent | 0f991786ee99f6793d2a9453422eeaf60f0c0464 (diff) | |
download | rails-6914d67ed15d41a239407e3c724b670d95a740a6.tar.gz rails-6914d67ed15d41a239407e3c724b670d95a740a6.tar.bz2 rails-6914d67ed15d41a239407e3c724b670d95a740a6.zip |
non-singleton true and false should go on regular font
Diffstat (limited to 'railties/guides/source/active_record_validations_callbacks.textile')
-rw-r--r-- | railties/guides/source/active_record_validations_callbacks.textile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/guides/source/active_record_validations_callbacks.textile b/railties/guides/source/active_record_validations_callbacks.textile index be9917868f..c7ba130a90 100644 --- a/railties/guides/source/active_record_validations_callbacks.textile +++ b/railties/guides/source/active_record_validations_callbacks.textile @@ -1020,7 +1020,7 @@ Like in validations, we can also make our callbacks conditional, calling them on h4. Using +:if+ and +:unless+ with a Symbol -You can associate the +:if+ and +:unless+ options with a symbol corresponding to the name of a method that will get called right before the callback. When using the +:if+ option, the callback won't be executed if the method returns +false+; when using the +:unless+ option, the callback won't be executed if the method returns +true+. This is the most common option. Using this form of registration it's also possible to register several different methods that should be called to check if the callback should be executed. +You can associate the +:if+ and +:unless+ options with a symbol corresponding to the name of a method that will get called right before the callback. When using the +:if+ option, the callback won't be executed if the method returns false; when using the +:unless+ option, the callback won't be executed if the method returns true. This is the most common option. Using this form of registration it's also possible to register several different methods that should be called to check if the callback should be executed. <ruby> class Order < ActiveRecord::Base |