Skip to content

Instantly share code, notes, and snippets.

@Frank004
Last active August 21, 2017 04:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Frank004/b90a01ef54b8d0402c0ab8cb650abfd6 to your computer and use it in GitHub Desktop.
Save Frank004/b90a01ef54b8d0402c0ab8cb650abfd6 to your computer and use it in GitHub Desktop.
def check_has_score
if foos.where(overall_score: 0.0).any?
errors.add(:base, "No puede cerrar la Bar hasta que todas los foo tengan puntuación")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment