i'm trying to use a custom validation but for some reason it's seems
like it is just getting ignored.
in my model:
total_rank = 0
for compound_material in self.compound_materials
total_rank += self.item.rank
avg_rank = total_rank / self.compound_materials.length
max_rank = avg_rank + 4
if self.item.rank > max_rank
errors.add_to_base "The compound entered is not valid because it
is greater than rank " + self.item.rank
anyone know what i should be doing differently?