Sha256: c86393d7c2046bbab7a2bb0c599a7cf30d5e8c19e493bb227e5a3c293a7d6cb7
Contents?: true
Size: 216 Bytes
Versions: 80
Compression:
Stored size: 216 Bytes
Contents
class Trophy < ActiveRecord::Base validate :count_within_limit, on: :create def count_within_limit return if Trophy.where(user_id: user_id).count < 5 errors.add(:base, "Exceeded trophy limit") end end
Version data entries
80 entries across 80 versions & 4 rubygems