-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
OK,
@chart= FactoryGirl.create(:ias_chart) @time = DateTime.now @ias_accounts = [411, 512] @ias_accounts.each do |number| (-1..1).each do |offset| @chart.ias_accounts << IasAccount.new(:number => number, :time => @time+ offset.days, :ias_chart => @chart) end end [411, 512] >> @chart.ias_accounts.size 12
while
@chart= FactoryGirl.create(:ias_chart) @time = DateTime.now @ias_accounts = [411, 512] @ias_accounts.each do |number| (-1..1).each do |offset| @chart.ias_accounts << IasAccount.new(:number => number, :time => @time+ offset.days) end end [411, 512] >> @chart.ias_accounts.size 6
The only difference between the two is that :ias_chart is specified in the IasAccount constructor in the first case and not in the second one.
Is that a desired behavior?!
- is duplicated by
-
MONGOID-3532 Callbacks are fired multipled times for nested embedded_many relationships
- Closed