Skip to content

Commit 3337492

Browse files
author
Alex Tharp
authored
Merge pull request #13 from cortex-cms/user-field-type-validation-fix
UserFieldType Validation Fix
2 parents b6aa070 + cb27831 commit 3337492

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/models/user_field_type.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ def mapping_field_name
2525
end
2626

2727
def valid_user_id?
28-
return true if id.nil?
28+
return true if user_id.nil?
2929

30-
unless User.exists?(id)
31-
errors.add(:user_id, "Must be for a Valid User")
30+
unless User.exists?(user_id)
31+
errors.add(:user_id, "does not exist")
3232
false
3333
end
3434
end

0 commit comments

Comments
 (0)