1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-19 13:54:25 +01:00

rejects project cao file if all blank

This commit is contained in:
Nicolas Florentin 2015-05-18 10:16:21 +02:00
parent 0561cd81ef
commit 4686a8c843

View File

@ -8,7 +8,7 @@ class Project < ActiveRecord::Base
has_one :project_image, as: :viewable, dependent: :destroy
accepts_nested_attributes_for :project_image, allow_destroy: true
has_many :project_caos, as: :viewable, dependent: :destroy
accepts_nested_attributes_for :project_caos, allow_destroy: true
accepts_nested_attributes_for :project_caos, allow_destroy: true, reject_if: :all_blank
has_and_belongs_to_many :machines, join_table: :projects_machines
has_and_belongs_to_many :components, join_table: :projects_components