mirror of
https://github.com/projekteuler/projekteuler.git
synced 2026-11-23 19:33:46 +01:00
Add presence and uniqueness validations for problem
This commit is contained in:
1 parent
c50808f68e
commit
fbb958cb41
4 files changed
+37
-9
No files matched your search
@@ -1,2 +1,4 @@
|
||||
class Problem < ActiveRecord::Base
|
||||
validates :title, :content, presence: true
|
||||
validates :title, uniqueness: true
|
||||
end
|
||||
Reference in new issue
Block a user