mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-19 13:54:25 +01:00
adds minimal validation to projects
This commit is contained in:
parent
f65bb95575
commit
ec203a8ef8
@ -33,6 +33,9 @@ class Project < ActiveRecord::Base
|
||||
has_many :project_steps, dependent: :destroy
|
||||
accepts_nested_attributes_for :project_steps, allow_destroy: true
|
||||
|
||||
# validations
|
||||
validates :author, :name, presence: true
|
||||
|
||||
after_save :after_save_and_publish
|
||||
|
||||
aasm :column => 'state' do
|
||||
|
Loading…
x
Reference in New Issue
Block a user