Add presence and uniqueness validations for problem

This commit is contained in:
pfischbeck committed 2014-12-10 10:44:10 +01:00
1 parent c50808f68e
commit fbb958cb41
4 files changed
+37 -9

No files matched your search

+2
View File
@@ -1,2 +1,4 @@
class Problem < ActiveRecord::Base
validates :title, :content, presence: true
validates :title, uniqueness: true
end