aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/active_record_validations.md
diff options
context:
space:
mode:
Diffstat (limited to 'guides/source/active_record_validations.md')
-rw-r--r--guides/source/active_record_validations.md12
1 files changed, 0 insertions, 12 deletions
diff --git a/guides/source/active_record_validations.md b/guides/source/active_record_validations.md
index 665e97c470..32b38cde5e 100644
--- a/guides/source/active_record_validations.md
+++ b/guides/source/active_record_validations.md
@@ -916,18 +916,6 @@ class Order < ApplicationRecord
end
```
-### Using a String with `:if` and `:unless`
-
-You can also use a string that will be evaluated using `eval` and needs to
-contain valid Ruby code. You should use this option only when the string
-represents a really short condition.
-
-```ruby
-class Person < ApplicationRecord
- validates :surname, presence: true, if: "name.nil?"
-end
-```
-
### Using a Proc with `:if` and `:unless`
Finally, it's possible to associate `:if` and `:unless` with a `Proc` object