Skip to content
This repository has been archived by the owner on Oct 28, 2019. It is now read-only.

Commit

Permalink
Fix typo in vaidate_inclusion_of
Browse files Browse the repository at this point in the history
Closes #95
  • Loading branch information
paulcsmith committed Nov 16, 2017
1 parent 9407060 commit a9144a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/validations_spec.cr
Expand Up @@ -26,7 +26,7 @@ private class TestValidationUser
end

def run_inclusion_validations
validate_inclusions_of name, in: ["Paul", "Pablo"]
validate_inclusion_of name, in: ["Paul", "Pablo"]
end

macro field(type, name)
Expand Down
2 changes: 1 addition & 1 deletion src/lucky_record/validations.cr
Expand Up @@ -19,7 +19,7 @@ module LuckyRecord::Validations
end
end

private def validate_inclusions_of(field, in allowed_values)
private def validate_inclusion_of(field, in allowed_values)
if !allowed_values.includes? field.value
field.add_error "is invalid"
end
Expand Down

0 comments on commit a9144a3

Please sign in to comment.