Skip to content

Instantly share code, notes, and snippets.

View aepstein's full-sized avatar

Ari Epstein aepstein

  • Various
  • Albany, NY
View GitHub Profile
@aepstein
aepstein / en.yml
Created June 28, 2011 14:32 — forked from chrisbloom7/01-validates-file-size-carrierwave.md
A cheap knock off of the default validates_length_of validator, but checks the filesize of a Carrierwave attachment (with callback option)
# config/locales/en.yml
en:
errors:
messages:
wrong_size: "is the wrong size (should be %{file_size})"
size_too_small: "is to small (should be at least %{file_size})"
size_too_big: "is to big (should be at most %{file_size})"