Fix guide. sample code syntax error.[ci skip]

This commit is contained in:
tbpgr 2014-07-03 23:58:23 +09:00
parent 03c9c0e2fa
commit d2623476f3
1 changed files with 1 additions and 1 deletions

View File

@ -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
```