We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b4957b commit dccb197Copy full SHA for dccb197
demo/app/models/user.rb
@@ -3,7 +3,7 @@ class User < ApplicationRecord
3
4
serialize :preferences, coder: JSON
5
6
- validates :email, presence: true, length: { minimum: 5 }, if: :always
+ validates :email, presence: true, length: { minimum: 5 }, if: :always?
7
validates :terms, acceptance: { accept: true }
8
9
# Conditional (always disabled) validators used in tests
@@ -15,7 +15,7 @@ class User < ApplicationRecord
15
16
has_rich_text(:life_story)
17
18
- def always
+ def always?
19
true
20
end
21
0 commit comments