1
0
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:
Nicolas Florentin 2016-04-21 17:10:50 +02:00
parent f65bb95575
commit ec203a8ef8

View File

@ -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