From a1ce07ee4c05df222c89762036404d3de8a12853 Mon Sep 17 00:00:00 2001 From: revathyn Date: Mon, 15 Feb 2021 16:07:28 +0530 Subject: [PATCH] Validates presence of description while creating new project --- app/models/project.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/project.rb b/app/models/project.rb index 6c0fae53..6b714346 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -24,6 +24,7 @@ class Project < ApplicationRecord validates :name, presence: true, uniqueness: { case_sensitive: false } validates_with ClientBillableValidator + validates :description, presence: true has_many :hours has_many :mileages has_many :users, -> { distinct }, through: :hours