Improve delivery form validation

This commit is contained in:
Julius 2013-06-19 11:21:55 +02:00
parent 0b81ba97b9
commit bf32e72414
4 changed files with 23 additions and 7 deletions

View file

@ -9,7 +9,7 @@ class Delivery < ActiveRecord::Base
scope :recent, :order => 'created_at DESC', :limit => 10
validates_presence_of :supplier_id
validates_presence_of :supplier_id, :delivered_on
accepts_nested_attributes_for :stock_changes, :allow_destroy => :true