Closed GoogleCodeExporter closed 9 years ago
Is a little funny you be able to reproduce that, I saw the code is strange some
time
ago but could not make it give me errors.
The problem here is not exactly the reload, but items in a collection are not
supposed to be erased that way. There are methods that rails adds to manipulate
items
in a collection when you associate things, its prefered instead of just nuke a
reference.
This is the right way to do it:
self.order_line_items.delete(self.promotion_line_item) if
self.promotion_line_item
Another thing: this line is supposed to be above the "minimum cart value"
comparison,
to not include promotions in the total to decide if a promotion should be
accepted
(another teoric problem that I could not reproduce).
As I didn't finished the tests for some controllers, at the time I saw that I
though
that something in the controller was making it don't give errors, I will try to
reproduce it again to include these patches that I already have.
Original comment by edmundo...@gmail.com
on 14 Jun 2008 at 2:45
Again, I cannot reproduce it using the user interface, using Firefox I'm not
allowed
to hit the submit button the second time, after hitted back button. I can only
press
it again if I go back changing the url to point to the first step again
(checkout).
Using IE6 I can press the button but the previous promotion is discarded.
Im using 1.0.a3 but there was no change in the set_promo_code method from
1.0.a2.
Original comment by edmundo...@gmail.com
on 14 Jun 2008 at 4:46
Added in the change edmundo mentioned just to ensure the reference is deleted
in the
proper manner. r113
Original comment by subim...@gmail.com
on 11 Aug 2008 at 10:45
Original issue reported on code.google.com by
rogerpack2005
on 11 Jun 2008 at 11:04