circleci
9 of 9 new or added lines in 1 file covered. (100.0%)
15 of 3514 relevant lines covered (0.43%)
0.0 hits per line
1 |
class IdExists < ActiveModel::Validator |
× |
2 |
def validate(record) |
× |
3 |
if leaf_id(record).blank?
|
× |
4 |
record.errors.add(:id, "can't be blank") |
× |
5 |
end
|
× |
6 |
end
|
× |
7 |
|
× |
8 |
private |
× |
9 |
|
× |
10 |
def leaf_id(record) |
× |
11 |
record.term_uri_leaf |
× |
12 |
end
|
× |
13 |
|
× |
14 |
end
|
× |