mirror of
https://github.com/rickbarrette/redmine_qbo_lineitems.git
synced 2026-04-02 07:01:59 -04:00
Don't save blank line items
This commit is contained in:
@@ -20,7 +20,9 @@ module RedmineQboLineItems
|
||||
|
||||
base.class_eval do
|
||||
has_many :line_items, dependent: :destroy
|
||||
accepts_nested_attributes_for :line_items, allow_destroy: true
|
||||
accepts_nested_attributes_for :line_items,
|
||||
allow_destroy: true,
|
||||
reject_if: proc { |attrs| attrs['description'].blank? }
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user