We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8560d09 commit 50c8bf7Copy full SHA for 50c8bf7
things_i_bought/app/models/purchase.rb
@@ -1,2 +1,4 @@
1
class Purchase < ActiveRecord::Base
2
+ validates :name, presence: true
3
+ validates :cost, numericality: { greater_than: 0 }
4
end
0 commit comments