initial commit
This commit is contained in:
6
app/models/project.rb
Normal file
6
app/models/project.rb
Normal file
@@ -0,0 +1,6 @@
|
||||
class Project < ApplicationRecord
|
||||
has_many :subprojects, inverse_of: :project
|
||||
accepts_nested_attributes_for :subprojects, allow_destroy: true, reject_if: :all_blank
|
||||
|
||||
validates :name, presence: true
|
||||
end
|
||||
Reference in New Issue
Block a user