Skip to content

Instantly share code, notes, and snippets.

@tanhit243
Created December 22, 2021 06:21
Show Gist options
  • Save tanhit243/70c1d27461899465faf459ce85834cf0 to your computer and use it in GitHub Desktop.
Save tanhit243/70c1d27461899465faf459ce85834cf0 to your computer and use it in GitHub Desktop.
of_kind? in rails
Kiểm tra model có bị lỗi abc trên thuộc tính xyz trong rails
model.errors.of_kind? :xyz, :abc //true or false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment