Require amount to be a number.
This commit is contained in:
1 parent
0806bf13df
commit
7930144e8c
1 file changed
+1
@@ -7,6 +7,7 @@ class Rate < ActiveRecord::Base
|
|||||||
|
|
||||||
validates_presence_of :user_id
|
validates_presence_of :user_id
|
||||||
validates_presence_of :date_in_effect
|
validates_presence_of :date_in_effect
|
||||||
|
validates_numericality_of :amount
|
||||||
|
|
||||||
before_save :unlocked?
|
before_save :unlocked?
|
||||||
before_destroy :unlocked?
|
before_destroy :unlocked?
|
||||||
|
|||||||
Reference in new issue
Block a user