mirror of https://github.com/rails/rails
Fix guide. sample code syntax error.[ci skip]
This commit is contained in:
parent
03c9c0e2fa
commit
d2623476f3
|
@ -871,7 +871,7 @@ should happen, an `Array` can be used. Moreover, you can apply both `:if` and
|
|||
```ruby
|
||||
class Computer < ActiveRecord::Base
|
||||
validates :mouse, presence: true,
|
||||
if: ["market.retail?", :desktop?]
|
||||
if: ["market.retail?", :desktop?],
|
||||
unless: Proc.new { |c| c.trackpad.present? }
|
||||
end
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue