We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Add a md5hash field to your model, then put the following code in your model:
before_validation :compute_hash validates_uniqueness_of :md5hash, :on => :create def compute_hash self.md5hash = Digest::MD5.hexdigest(self.data.read) end