Skip to content

Commit dccb197

Browse files
committed
RuboCop fix
1 parent 0b4957b commit dccb197

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

demo/app/models/user.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ class User < ApplicationRecord
33

44
serialize :preferences, coder: JSON
55

6-
validates :email, presence: true, length: { minimum: 5 }, if: :always
6+
validates :email, presence: true, length: { minimum: 5 }, if: :always?
77
validates :terms, acceptance: { accept: true }
88

99
# Conditional (always disabled) validators used in tests
@@ -15,7 +15,7 @@ class User < ApplicationRecord
1515

1616
has_rich_text(:life_story)
1717

18-
def always
18+
def always?
1919
true
2020
end
2121

0 commit comments

Comments
 (0)