1
0

Added Source perms and routing

Added Quantity displayed defaults
This commit is contained in:
cryptogopher
2019-09-23 15:05:26 +02:00
parent e58952b0e7
commit ce9f011694
4 changed files with 13 additions and 4 deletions

View File

@@ -13,4 +13,10 @@ class Quantity < ActiveRecord::Base
validate if: -> { parent.present? } do
errors.add(:parent, :parent_domain_mismatch) unless domain == parent.domain
end
after_initialize do
if new_record?
self.displayed = false if self.displayed.nil?
end
end
end