Class: StockTaking

Inherits:
StockEvent show all
Defined in:
app/models/stock_taking.rb

Instance Method Summary collapse

Instance Method Details

#stock_change_attributes=(stock_change_attributes) ⇒ Object



2
3
4
5
6
# File 'app/models/stock_taking.rb', line 2

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