aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorJoe Francis <joe@lostapathy.com>2017-06-05 11:34:40 -0500
committerMatthew Draper <matthew@trebex.net>2017-06-06 02:04:40 +0930
commit7892b717a801e40ee4db1ac6622d844ae6998132 (patch)
treedee897f7fe118f57e04323ed0b7773c74d549ed5 /guides/source
parent7a443756fe78e44ee32226085147fc9bf6df6add (diff)
downloadrails-7892b717a801e40ee4db1ac6622d844ae6998132.tar.gz
rails-7892b717a801e40ee4db1ac6622d844ae6998132.tar.bz2
rails-7892b717a801e40ee4db1ac6622d844ae6998132.zip
Remove deprecated passing of string to :if/:unless (#29357)
Other examples were removed in 53ff5fc62f9d11b6f60d371df959137f4bf40728 [ci skip]
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/active_record_validations.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/active_record_validations.md b/guides/source/active_record_validations.md
index 5313361dfd..6eb5de78be 100644
--- a/guides/source/active_record_validations.md
+++ b/guides/source/active_record_validations.md
@@ -953,7 +953,7 @@ should happen, an `Array` can be used. Moreover, you can apply both `:if` and
```ruby
class Computer < ApplicationRecord
validates :mouse, presence: true,
- if: ["market.retail?", :desktop?],
+ if: [Proc.new { |c| c.market.retail? }, :desktop?],
unless: Proc.new { |c| c.trackpad.present? }
end
```