mirror of
https://github.com/we-promise/sure.git
synced 2026-04-23 05:54:08 +00:00
Add presence validations for required fields (#545)
* Adds basic validations for required fields Also deletes a few extraneous .keep files Does not add the family_id required field for user, since that breaks the basic test setup * Restore keep files to this branch * Remove Credit model and validate models behind ids * Restore concerns .keep
This commit is contained in:
committed by
GitHub
parent
a4c97a9d52
commit
e5750d1a13
@@ -1,6 +1,8 @@
|
||||
class Valuation < ApplicationRecord
|
||||
belongs_to :account
|
||||
|
||||
validates :account, :date, :value, presence: true
|
||||
|
||||
after_commit :sync_account
|
||||
|
||||
scope :in_period, ->(period) { period.date_range.nil? ? all : where(date: period.date_range) }
|
||||
|
||||
Reference in New Issue
Block a user