mirror of
https://github.com/rickbarrette/redmine_qbo_lineitems.git
synced 2026-10-04 09:20:43 -04:00
Don't save blank line items
This commit is contained in:
1 parent
acd54a5e57
commit
1d29d2a816
2 files changed
+4
-2
No files matched your search
@@ -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