Class: StockTaking

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/stock_taking.rb

Instance Method Summary collapse

Instance Method Details

#stock_change_attributes=(stock_change_attributes) ⇒ Object


8
9
10
11
12
# File 'app/models/stock_taking.rb', line 8

def stock_change_attributes=(stock_change_attributes)
  for attributes in stock_change_attributes
    stock_changes.build(attributes) unless attributes[:quantity].to_i == 0
  end
end