shop_bunny 0.8.6 → 0.8.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,4 +4,5 @@ class ShopBunny::CouponUse < ActiveRecord::Base
4
4
 
5
5
  validates_presence_of :cart_id
6
6
  validates_presence_of :coupon_id
7
+ validates_uniqueness_of :coupon_id, :scope => :cart_id
7
8
  end
@@ -0,0 +1,10 @@
1
+ class IndexToCouponUseCouponIdAndCartId < ActiveRecord::Migration
2
+
3
+ def up
4
+ add_index :coupon_uses, [:cart_id, :coupon_id], :unique => true
5
+ end
6
+
7
+ def down
8
+ remove_index :coupon_uses, :column => [:cart_id, :coupon_id]
9
+ end
10
+ end
@@ -8,8 +8,8 @@ module ShopBunny
8
8
 
9
9
  def show
10
10
  respond_with @cart
11
- end
12
-
11
+ end
12
+
13
13
  def add_item
14
14
  if !params[:quantity].blank?
15
15
  quantity = params[:quantity].to_i
@@ -21,29 +21,33 @@ module ShopBunny
21
21
  format.html { redirect_to cart_path }
22
22
  end
23
23
  end
24
-
24
+
25
25
  def remove_item
26
26
  @cart.remove_item(@item) if @item
27
27
  respond_with @cart do |format|
28
28
  format.html { redirect_to cart_path }
29
29
  end
30
30
  end
31
-
31
+
32
32
  def update
33
33
  @cart.update_attributes(params[:cart])
34
34
  respond_with @cart do |format|
35
35
  format.html {
36
36
  if @cart.errors.empty?
37
- redirect_to cart_path
38
- else
39
- render :show
40
- end
37
+ redirect_to after_update_path
38
+ else
39
+ render :show
40
+ end
41
41
  }
42
42
  end
43
43
  end
44
-
44
+
45
45
  private
46
-
46
+
47
+ def after_update_path
48
+ cart_path
49
+ end
50
+
47
51
  def find_item
48
52
  @item = @cart.item_model.find(params[:item_id])
49
53
  end
@@ -5,9 +5,10 @@ module ShopBunny
5
5
  clazz.send(:attr_accessor, :coupon_code)
6
6
  clazz.send(:has_many, :cart_items, :dependent => :destroy, :class_name => 'ShopBunny::CartItem')
7
7
  clazz.send(:has_many, :coupon_uses, :dependent => :destroy, :class_name => 'ShopBunny::CouponUse')
8
- clazz.send(:has_many, :coupons, :through => :coupon_uses, :uniq => true)
8
+ clazz.send(:has_many, :coupons, :through => :coupon_uses)
9
9
  clazz.send(:accepts_nested_attributes_for, :cart_items, :allow_destroy => true )
10
10
  clazz.send(:before_save, :update_coupons)
11
+ clazz.send(:after_save, :free_coupon_code)
11
12
  clazz.send(:attr_accessible, :coupon_code, :cart_items_attributes)
12
13
  clazz.send(:validate, :coupon_code_must_be_valid)
13
14
  end
@@ -23,7 +24,7 @@ module ShopBunny
23
24
  def item_count
24
25
  self.cart_items.inject(0) {|sum,e| sum += e.quantity}
25
26
  end
26
-
27
+
27
28
  def shipping_costs(options = {})
28
29
  return 0 if coupons.any?(&:removes_shipping_cost)
29
30
  shipping_cost_calculator.costs_for(self, options)
@@ -138,9 +139,14 @@ module ShopBunny
138
139
  def update_coupons
139
140
  Array(@coupon_code).each { |code|
140
141
  coupon = Coupon.find_by_code(code)
142
+ return if coupons.include? coupon
141
143
  coupons << coupon if coupon && coupon.redeemable?
142
144
  }
143
145
  end
146
+
147
+ def free_coupon_code
148
+ self.coupon_code = nil
149
+ end
144
150
 
145
151
  def coupon_code_must_be_valid
146
152
  Array(@coupon_code).each { |code|
@@ -151,6 +157,10 @@ module ShopBunny
151
157
  errors.add(:coupon_code, :expired)
152
158
  elsif coupon.used_up? && !coupons.include?(coupon)
153
159
  errors.add(:coupon_code, :used_up)
160
+ elsif !coupon.redeemable?
161
+ errors.add(:coupon_code, :not_redeemable)
162
+ elsif coupons.map(&:code).include? coupon.code
163
+ errors.add(:coupon_code, :already_added)
154
164
  end
155
165
  }
156
166
  end
@@ -1,3 +1,3 @@
1
1
  module ShopBunny
2
- VERSION = "0.8.6"
2
+ VERSION = "0.8.8"
3
3
  end
Binary file
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended to check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(:version => 20111130123434) do
14
+ ActiveRecord::Schema.define(:version => 20120315145137) do
15
15
 
16
16
  create_table "cart_items", :force => true do |t|
17
17
  t.integer "cart_id"
@@ -34,6 +34,8 @@ ActiveRecord::Schema.define(:version => 20111130123434) do
34
34
  t.datetime "updated_at"
35
35
  end
36
36
 
37
+ add_index "coupon_uses", ["cart_id", "coupon_id"], :name => "index_coupon_uses_on_cart_id_and_coupon_id", :unique => true
38
+
37
39
  create_table "coupons", :force => true do |t|
38
40
  t.boolean "removes_tax", :default => false
39
41
  t.float "discount_percentage", :default => 1.0
Binary file
@@ -0,0 +1,99 @@
1
+  (0.0ms) select sqlite_version(*)
2
+  (7.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
3
+  (0.0ms) PRAGMA index_list("schema_migrations")
4
+  (3.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
6
+ Migrating to CreateCarts (20100902115627)
7
+  (0.2ms) CREATE TABLE "carts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "owner_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime)
8
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100902115627')
9
+ Migrating to CreateCartItems (20100902115757)
10
+  (0.2ms) CREATE TABLE "cart_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "cart_id" integer, "item_id" integer, "quantity" integer, "created_at" datetime, "updated_at" datetime)
11
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100902115757')
12
+ Migrating to CreateItems (20100915073016)
13
+  (0.3ms) CREATE TABLE "items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "price" float, "title" varchar(255), "created_at" datetime, "updated_at" datetime)
14
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100915073016')
15
+ Migrating to CreateCoupons (20100915091059)
16
+  (0.3ms) CREATE TABLE "coupons" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "removes_tax" boolean DEFAULT 'f', "discount_percentage" float DEFAULT 1.0, "discount_credit" float DEFAULT 0.0, "removes_shipping_cost" boolean DEFAULT 'f', "bonus_article_id" integer, "valid_from" date, "valid_until" date, "title" text, "code" varchar(255), "created_at" datetime, "updated_at" datetime)
17
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100915091059')
18
+ Migrating to CreateCouponUses (20100915093821)
19
+  (0.2ms) CREATE TABLE "coupon_uses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "cart_id" integer, "coupon_id" integer, "created_at" datetime, "updated_at" datetime)
20
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100915093821')
21
+ Migrating to RemoveOwnerIdFromCarts (20100915162029)
22
+  (0.3ms) CREATE TEMPORARY TABLE "altered_carts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "owner_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime)
23
+  (0.0ms) PRAGMA index_list("carts")
24
+  (0.1ms) SELECT * FROM "carts"
25
+  (0.1ms) DROP TABLE "carts"
26
+  (0.2ms) CREATE TABLE "carts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "type" varchar(255), "created_at" datetime, "updated_at" datetime)
27
+  (0.0ms) PRAGMA index_list("altered_carts")
28
+  (0.1ms) SELECT * FROM "altered_carts"
29
+  (0.2ms) DROP TABLE "altered_carts"
30
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100915162029')
31
+ Migrating to SetDefaultColumnValueForCartItemsQuantity (20100916194407)
32
+  (0.2ms) CREATE TEMPORARY TABLE "altered_cart_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "cart_id" integer, "item_id" integer, "quantity" integer, "created_at" datetime, "updated_at" datetime) 
33
+  (0.0ms) PRAGMA index_list("cart_items")
34
+  (0.1ms) SELECT * FROM "cart_items"
35
+  (0.1ms) DROP TABLE "cart_items"
36
+  (0.2ms) CREATE TABLE "cart_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "cart_id" integer, "item_id" integer, "quantity" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime) 
37
+  (0.0ms) PRAGMA index_list("altered_cart_items")
38
+  (0.1ms) SELECT * FROM "altered_cart_items"
39
+  (0.1ms) DROP TABLE "altered_cart_items"
40
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100916194407')
41
+ Migrating to AddValueOfAutomaticAddToCoupons (20101125140137)
42
+  (0.2ms) ALTER TABLE "coupons" ADD "value_of_automatic_add" float
43
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101125140137')
44
+ Migrating to ChangeValidFromAndUntilToDatetimeOnCoupons (20101125151017)
45
+  (0.2ms) CREATE TEMPORARY TABLE "altered_coupons" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "removes_tax" boolean DEFAULT 'f', "discount_percentage" float DEFAULT 1.0, "discount_credit" float DEFAULT 0.0, "removes_shipping_cost" boolean DEFAULT 'f', "bonus_article_id" integer, "valid_from" date, "valid_until" date, "title" text, "code" varchar(255), "created_at" datetime, "updated_at" datetime, "value_of_automatic_add" float)
46
+  (0.0ms) PRAGMA index_list("coupons")
47
+  (0.1ms) SELECT * FROM "coupons"
48
+  (0.1ms) DROP TABLE "coupons"
49
+  (0.2ms) CREATE TABLE "coupons" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "removes_tax" boolean DEFAULT 'f', "discount_percentage" float DEFAULT 1.0, "discount_credit" float DEFAULT 0.0, "removes_shipping_cost" boolean DEFAULT 'f', "bonus_article_id" integer, "valid_from" datetime, "valid_until" date, "title" text, "code" varchar(255), "created_at" datetime, "updated_at" datetime, "value_of_automatic_add" float)
50
+  (0.0ms) PRAGMA index_list("altered_coupons")
51
+  (0.1ms) SELECT * FROM "altered_coupons"
52
+  (0.1ms) DROP TABLE "altered_coupons"
53
+  (0.2ms) CREATE TEMPORARY TABLE "altered_coupons" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "removes_tax" boolean DEFAULT 'f', "discount_percentage" float DEFAULT 1.0, "discount_credit" float DEFAULT 0.0, "removes_shipping_cost" boolean DEFAULT 'f', "bonus_article_id" integer, "valid_from" datetime, "valid_until" date, "title" text, "code" varchar(255), "created_at" datetime, "updated_at" datetime, "value_of_automatic_add" float)
54
+  (0.0ms) PRAGMA index_list("coupons")
55
+  (0.1ms) SELECT * FROM "coupons"
56
+  (0.2ms) DROP TABLE "coupons"
57
+  (0.2ms) CREATE TABLE "coupons" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "removes_tax" boolean DEFAULT 'f', "discount_percentage" float DEFAULT 1.0, "discount_credit" float DEFAULT 0.0, "removes_shipping_cost" boolean DEFAULT 'f', "bonus_article_id" integer, "valid_from" datetime, "valid_until" datetime, "title" text, "code" varchar(255), "created_at" datetime, "updated_at" datetime, "value_of_automatic_add" float)
58
+  (0.0ms) PRAGMA index_list("altered_coupons")
59
+  (0.1ms) SELECT * FROM "altered_coupons"
60
+  (0.1ms) DROP TABLE "altered_coupons"
61
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101125151017')
62
+ Migrating to AddRawItemToCartItems (20110202235446)
63
+  (0.2ms) ALTER TABLE "cart_items" ADD "raw_item" text
64
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items"
65
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110202235446')
66
+ Migrating to RemoveItemIdFromCartItems (20110203005514)
67
+  (0.2ms) CREATE TEMPORARY TABLE "altered_cart_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "cart_id" integer, "item_id" integer, "quantity" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime, "raw_item" text)
68
+  (0.0ms) PRAGMA index_list("cart_items")
69
+  (0.1ms) SELECT * FROM "cart_items"
70
+  (0.2ms) DROP TABLE "cart_items"
71
+  (0.1ms) CREATE TABLE "cart_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "cart_id" integer, "quantity" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime, "raw_item" text)
72
+  (0.0ms) PRAGMA index_list("altered_cart_items")
73
+  (0.1ms) SELECT * FROM "altered_cart_items"
74
+  (0.1ms) DROP TABLE "altered_cart_items"
75
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110203005514')
76
+ Migrating to AddMaxUsesToCoupon (20110821124655)
77
+  (0.3ms) ALTER TABLE "coupons" ADD "max_uses" integer
78
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110821124655')
79
+ Migrating to AddActiveFlagToCoupon (20111123234953)
80
+  (0.2ms) ALTER TABLE "coupons" ADD "active" boolean
81
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111123234953')
82
+ Migrating to AddStateAndRemoveActiveFromCoupons (20111130123434)
83
+  (0.2ms) ALTER TABLE "coupons" ADD "state" varchar(255)
84
+  (0.2ms) CREATE TEMPORARY TABLE "altered_coupons" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "removes_tax" boolean DEFAULT 'f', "discount_percentage" float DEFAULT 1.0, "discount_credit" float DEFAULT 0.0, "removes_shipping_cost" boolean DEFAULT 'f', "bonus_article_id" integer, "valid_from" datetime, "valid_until" datetime, "title" text, "code" varchar(255), "created_at" datetime, "updated_at" datetime, "value_of_automatic_add" float, "max_uses" integer, "active" boolean, "state" varchar(255))
85
+  (0.0ms) PRAGMA index_list("coupons")
86
+  (0.1ms) SELECT * FROM "coupons"
87
+  (0.2ms) DROP TABLE "coupons"
88
+  (0.2ms) CREATE TABLE "coupons" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "removes_tax" boolean DEFAULT 'f', "discount_percentage" float DEFAULT 1.0, "discount_credit" float DEFAULT 0.0, "removes_shipping_cost" boolean DEFAULT 'f', "bonus_article_id" integer, "valid_from" datetime, "valid_until" datetime, "title" text, "code" varchar(255), "created_at" datetime, "updated_at" datetime, "value_of_automatic_add" float, "max_uses" integer, "state" varchar(255))
89
+  (0.0ms) PRAGMA index_list("altered_coupons")
90
+  (0.1ms) SELECT * FROM "altered_coupons"
91
+  (0.1ms) DROP TABLE "altered_coupons"
92
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111130123434')
93
+  (0.3ms) select sqlite_version(*)
94
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
95
+  (0.0ms) PRAGMA index_list("cart_items")
96
+  (0.0ms) PRAGMA index_list("carts")
97
+  (0.0ms) PRAGMA index_list("coupon_uses")
98
+  (0.0ms) PRAGMA index_list("coupons")
99
+  (0.0ms) PRAGMA index_list("items")
@@ -0,0 +1,32885 @@
1
+  (0.1ms) select sqlite_version(*)
2
+  (4.5ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
3
+  (0.0ms) PRAGMA index_list("schema_migrations")
4
+  (3.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5
+  (0.0ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
6
+ Migrating to CreateCarts (20100902115627)
7
+  (0.2ms) CREATE TABLE "carts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "owner_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime)
8
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100902115627')
9
+ Migrating to CreateCartItems (20100902115757)
10
+  (0.2ms) CREATE TABLE "cart_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "cart_id" integer, "item_id" integer, "quantity" integer, "created_at" datetime, "updated_at" datetime)
11
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100902115757')
12
+ Migrating to CreateCoupons (20100915091059)
13
+  (0.4ms) CREATE TABLE "coupons" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "removes_tax" boolean DEFAULT 'f', "discount_percentage" float DEFAULT 1.0, "discount_credit" float DEFAULT 0.0, "removes_shipping_cost" boolean DEFAULT 'f', "bonus_article_id" integer, "valid_from" date, "valid_until" date, "title" text, "code" varchar(255), "created_at" datetime, "updated_at" datetime)
14
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100915091059')
15
+ Migrating to CreateCouponUses (20100915093821)
16
+  (0.2ms) CREATE TABLE "coupon_uses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "cart_id" integer, "coupon_id" integer, "created_at" datetime, "updated_at" datetime)
17
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100915093821')
18
+ Migrating to RemoveOwnerIdFromCarts (20100915162029)
19
+  (0.3ms) CREATE TEMPORARY TABLE "altered_carts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "owner_id" integer, "type" varchar(255), "created_at" datetime, "updated_at" datetime)
20
+  (0.0ms) PRAGMA index_list("carts")
21
+  (0.1ms) SELECT * FROM "carts"
22
+  (0.1ms) DROP TABLE "carts"
23
+  (0.1ms) CREATE TABLE "carts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "type" varchar(255), "created_at" datetime, "updated_at" datetime)
24
+  (0.0ms) PRAGMA index_list("altered_carts")
25
+  (0.0ms) SELECT * FROM "altered_carts"
26
+  (0.1ms) DROP TABLE "altered_carts"
27
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100915162029')
28
+ Migrating to SetDefaultColumnValueForCartItemsQuantity (20100916194407)
29
+  (0.2ms) CREATE TEMPORARY TABLE "altered_cart_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "cart_id" integer, "item_id" integer, "quantity" integer, "created_at" datetime, "updated_at" datetime) 
30
+  (0.0ms) PRAGMA index_list("cart_items")
31
+  (0.1ms) SELECT * FROM "cart_items"
32
+  (0.2ms) DROP TABLE "cart_items"
33
+  (0.2ms) CREATE TABLE "cart_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "cart_id" integer, "item_id" integer, "quantity" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime) 
34
+  (0.0ms) PRAGMA index_list("altered_cart_items")
35
+  (0.1ms) SELECT * FROM "altered_cart_items"
36
+  (0.2ms) DROP TABLE "altered_cart_items"
37
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100916194407')
38
+ Migrating to AddValueOfAutomaticAddToCoupons (20101125140137)
39
+  (0.4ms) ALTER TABLE "coupons" ADD "value_of_automatic_add" float
40
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101125140137')
41
+ Migrating to ChangeValidFromAndUntilToDatetimeOnCoupons (20101125151017)
42
+  (0.2ms) CREATE TEMPORARY TABLE "altered_coupons" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "removes_tax" boolean DEFAULT 'f', "discount_percentage" float DEFAULT 1.0, "discount_credit" float DEFAULT 0.0, "removes_shipping_cost" boolean DEFAULT 'f', "bonus_article_id" integer, "valid_from" date, "valid_until" date, "title" text, "code" varchar(255), "created_at" datetime, "updated_at" datetime, "value_of_automatic_add" float)
43
+  (0.0ms) PRAGMA index_list("coupons")
44
+  (0.1ms) SELECT * FROM "coupons"
45
+  (0.2ms) DROP TABLE "coupons"
46
+  (0.3ms) CREATE TABLE "coupons" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "removes_tax" boolean DEFAULT 'f', "discount_percentage" float DEFAULT 1.0, "discount_credit" float DEFAULT 0.0, "removes_shipping_cost" boolean DEFAULT 'f', "bonus_article_id" integer, "valid_from" datetime, "valid_until" date, "title" text, "code" varchar(255), "created_at" datetime, "updated_at" datetime, "value_of_automatic_add" float)
47
+  (0.0ms) PRAGMA index_list("altered_coupons")
48
+  (0.1ms) SELECT * FROM "altered_coupons"
49
+  (0.1ms) DROP TABLE "altered_coupons"
50
+  (0.2ms) CREATE TEMPORARY TABLE "altered_coupons" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "removes_tax" boolean DEFAULT 'f', "discount_percentage" float DEFAULT 1.0, "discount_credit" float DEFAULT 0.0, "removes_shipping_cost" boolean DEFAULT 'f', "bonus_article_id" integer, "valid_from" datetime, "valid_until" date, "title" text, "code" varchar(255), "created_at" datetime, "updated_at" datetime, "value_of_automatic_add" float)
51
+  (0.0ms) PRAGMA index_list("coupons")
52
+  (0.1ms) SELECT * FROM "coupons"
53
+  (0.2ms) DROP TABLE "coupons"
54
+  (0.1ms) CREATE TABLE "coupons" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "removes_tax" boolean DEFAULT 'f', "discount_percentage" float DEFAULT 1.0, "discount_credit" float DEFAULT 0.0, "removes_shipping_cost" boolean DEFAULT 'f', "bonus_article_id" integer, "valid_from" datetime, "valid_until" datetime, "title" text, "code" varchar(255), "created_at" datetime, "updated_at" datetime, "value_of_automatic_add" float)
55
+  (0.0ms) PRAGMA index_list("altered_coupons")
56
+  (0.1ms) SELECT * FROM "altered_coupons"
57
+  (0.1ms) DROP TABLE "altered_coupons"
58
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20101125151017')
59
+ Migrating to AddRawItemToCartItems (20110202235446)
60
+  (0.2ms) ALTER TABLE "cart_items" ADD "raw_item" text
61
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items"
62
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110202235446')
63
+ Migrating to RemoveItemIdFromCartItems (20110203005514)
64
+  (0.1ms) CREATE TEMPORARY TABLE "altered_cart_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "cart_id" integer, "item_id" integer, "quantity" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime, "raw_item" text)
65
+  (0.0ms) PRAGMA index_list("cart_items")
66
+  (0.1ms) SELECT * FROM "cart_items"
67
+  (0.1ms) DROP TABLE "cart_items"
68
+  (0.1ms) CREATE TABLE "cart_items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "cart_id" integer, "quantity" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime, "raw_item" text)
69
+  (0.0ms) PRAGMA index_list("altered_cart_items")
70
+  (0.0ms) SELECT * FROM "altered_cart_items"
71
+  (0.1ms) DROP TABLE "altered_cart_items"
72
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110203005514')
73
+ Migrating to AddMaxUsesToCoupon (20110821124655)
74
+  (0.3ms) ALTER TABLE "coupons" ADD "max_uses" integer
75
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20110821124655')
76
+ Migrating to AddActiveFlagToCoupon (20111123234953)
77
+  (0.2ms) ALTER TABLE "coupons" ADD "active" boolean
78
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111123234953')
79
+ Migrating to AddStateAndRemoveActiveFromCoupons (20111130123434)
80
+  (0.3ms) ALTER TABLE "coupons" ADD "state" varchar(255)
81
+  (0.4ms) CREATE TEMPORARY TABLE "altered_coupons" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "removes_tax" boolean DEFAULT 'f', "discount_percentage" float DEFAULT 1.0, "discount_credit" float DEFAULT 0.0, "removes_shipping_cost" boolean DEFAULT 'f', "bonus_article_id" integer, "valid_from" datetime, "valid_until" datetime, "title" text, "code" varchar(255), "created_at" datetime, "updated_at" datetime, "value_of_automatic_add" float, "max_uses" integer, "active" boolean, "state" varchar(255))
82
+  (0.0ms) PRAGMA index_list("coupons")
83
+  (0.1ms) SELECT * FROM "coupons"
84
+  (0.2ms) DROP TABLE "coupons"
85
+  (0.2ms) CREATE TABLE "coupons" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "removes_tax" boolean DEFAULT 'f', "discount_percentage" float DEFAULT 1.0, "discount_credit" float DEFAULT 0.0, "removes_shipping_cost" boolean DEFAULT 'f', "bonus_article_id" integer, "valid_from" datetime, "valid_until" datetime, "title" text, "code" varchar(255), "created_at" datetime, "updated_at" datetime, "value_of_automatic_add" float, "max_uses" integer, "state" varchar(255))
86
+  (0.0ms) PRAGMA index_list("altered_coupons")
87
+  (0.1ms) SELECT * FROM "altered_coupons"
88
+  (0.1ms) DROP TABLE "altered_coupons"
89
+  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20111130123434')
90
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
91
+ Migrating to CreateItems (20100915073016)
92
+  (0.2ms) CREATE TABLE "items" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "price" float, "title" varchar(255), "created_at" datetime, "updated_at" datetime)
93
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20100915073016')
94
+  (0.0ms) SAVEPOINT active_record_1
95
+ SQL (2.7ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00]]
96
+  (0.0ms) RELEASE SAVEPOINT active_record_1
97
+ Cart Load (0.1ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
98
+  (0.0ms) SELECT COUNT(*) FROM "carts"
99
+ Processing by ShopBunny::CartsController#show as HTML
100
+ Parameters: {"use_route"=>"shop_bunny"}
101
+  (0.1ms) SAVEPOINT active_record_1
102
+ SQL (0.3ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00]]
103
+  (0.0ms) RELEASE SAVEPOINT active_record_1
104
+ Rendered /home/zambot/dev/shop_bunny/app/views/shop_bunny/carts/show.html.erb (13.8ms)
105
+ Completed 200 OK in 76ms (Views: 73.6ms | ActiveRecord: 0.4ms)
106
+  (0.1ms) SELECT COUNT(*) FROM "carts"
107
+  (0.0ms) SAVEPOINT active_record_1
108
+ SQL (0.3ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00]]
109
+  (0.0ms) RELEASE SAVEPOINT active_record_1
110
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
111
+ Processing by ShopBunny::CartsController#show as HTML
112
+ Parameters: {"use_route"=>"shop_bunny"}
113
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
114
+ Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
115
+  (0.0ms) SAVEPOINT active_record_1
116
+ SQL (0.3ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00]]
117
+  (0.0ms) RELEASE SAVEPOINT active_record_1
118
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
119
+  (0.1ms) SAVEPOINT active_record_1
120
+ SQL (0.3ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["price", 15.99], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00]]
121
+  (0.0ms) RELEASE SAVEPOINT active_record_1
122
+ Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
123
+ Processing by ShopBunny::CartsController#add_item as HTML
124
+ Parameters: {"item_id"=>"1", "use_route"=>"shop_bunny"}
125
+  (0.0ms) SAVEPOINT active_record_1
126
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00]]
127
+  (0.0ms) RELEASE SAVEPOINT active_record_1
128
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]]
129
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 2
130
+  (0.0ms) SAVEPOINT active_record_1
131
+ SQL (0.1ms) INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["cart_id", 2], ["created_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["item_id", nil], ["quantity", 1], ["raw_item", "{\"id\":1,\"price\":15.99,\"title\":\"MyString\",\"created_at\":\"2012-02-01T14:49:33Z\",\"updated_at\":\"2012-02-01T14:49:33Z\"}"], ["updated_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00]]
132
+ SQLite3::SQLException: table cart_items has no column named item_id: INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?)
133
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
134
+ Completed 500 Internal Server Error in 37ms
135
+  (0.0ms) SAVEPOINT active_record_1
136
+ SQL (0.4ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00]]
137
+  (0.1ms) RELEASE SAVEPOINT active_record_1
138
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
139
+  (0.0ms) SAVEPOINT active_record_1
140
+  (0.1ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'shipping0.764417104031397' LIMIT 1
141
+ SQL (0.5ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "shipping0.764417104031397"], ["created_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", true], ["removes_tax", false], ["state", "active"], ["title", "No Shipping"], ["updated_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
142
+  (0.0ms) RELEASE SAVEPOINT active_record_1
143
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
144
+ Processing by ShopBunny::CartsController#update as HTML
145
+ Parameters: {"cart"=>{"coupon_code"=>"shipping0.764417104031397"}, "use_route"=>"shop_bunny"}
146
+  (0.0ms) SAVEPOINT active_record_1
147
+ SQL (21.8ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00]]
148
+  (0.1ms) RELEASE SAVEPOINT active_record_1
149
+  (0.0ms) SAVEPOINT active_record_1
150
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'shipping0.764417104031397' LIMIT 1
151
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'shipping0.764417104031397' LIMIT 1
152
+ SQL (0.3ms) INSERT INTO "coupon_uses" ("cart_id", "coupon_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["cart_id", 2], ["coupon_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["updated_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00]]
153
+  (0.0ms) RELEASE SAVEPOINT active_record_1
154
+ Redirected to http://test.host/cart
155
+ Completed 302 Found in 86ms
156
+ ShopBunny::Coupon Load (0.2ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 2
157
+  (0.0ms) SAVEPOINT active_record_1
158
+ SQL (0.3ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00]]
159
+  (0.0ms) RELEASE SAVEPOINT active_record_1
160
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
161
+  (0.0ms) SAVEPOINT active_record_1
162
+  (0.0ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'shipping1.0323944287706324' LIMIT 1
163
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "shipping1.0323944287706324"], ["created_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", true], ["removes_tax", false], ["state", "active"], ["title", "No Shipping"], ["updated_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
164
+  (0.0ms) RELEASE SAVEPOINT active_record_1
165
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
166
+ Processing by ShopBunny::CartsController#update as HTML
167
+ Parameters: {"cart"=>{"coupon_code"=>"incorrectcode"}, "use_route"=>"shop_bunny"}
168
+  (0.0ms) SAVEPOINT active_record_1
169
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00]]
170
+  (0.0ms) RELEASE SAVEPOINT active_record_1
171
+  (0.0ms) SAVEPOINT active_record_1
172
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'incorrectcode' LIMIT 1
173
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
174
+ Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.4ms)
175
+ ShopBunny::Coupon Load (0.2ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 2
176
+  (0.0ms) SAVEPOINT active_record_1
177
+ SQL (0.3ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00]]
178
+  (0.0ms) RELEASE SAVEPOINT active_record_1
179
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
180
+  (0.0ms) SAVEPOINT active_record_1
181
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00]]
182
+  (0.0ms) RELEASE SAVEPOINT active_record_1
183
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 2]]
184
+  (0.0ms) SAVEPOINT active_record_1
185
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["price", 15.99], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00]]
186
+  (0.0ms) RELEASE SAVEPOINT active_record_1
187
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
188
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 2
189
+  (0.0ms) SAVEPOINT active_record_1
190
+ SQL (0.1ms) INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["cart_id", 2], ["created_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["item_id", nil], ["quantity", 1], ["raw_item", "{\"id\":1,\"price\":15.99,\"title\":\"MyString\",\"created_at\":\"2012-02-01T14:49:33Z\",\"updated_at\":\"2012-02-01T14:49:33Z\"}"], ["updated_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00]]
191
+ SQLite3::SQLException: table cart_items has no column named item_id: INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?)
192
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
193
+  (0.0ms) SAVEPOINT active_record_1
194
+ SQL (0.3ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00]]
195
+  (0.0ms) RELEASE SAVEPOINT active_record_1
196
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
197
+  (0.0ms) SAVEPOINT active_record_1
198
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00]]
199
+  (0.0ms) RELEASE SAVEPOINT active_record_1
200
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 2]]
201
+  (0.0ms) SAVEPOINT active_record_1
202
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["price", 15.99], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00]]
203
+  (0.0ms) RELEASE SAVEPOINT active_record_1
204
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
205
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 2
206
+  (0.0ms) SAVEPOINT active_record_1
207
+ SQL (0.1ms) INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["cart_id", 2], ["created_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["item_id", nil], ["quantity", 1], ["raw_item", "{\"id\":1,\"price\":15.99,\"title\":\"MyString\",\"created_at\":\"2012-02-01T14:49:33Z\",\"updated_at\":\"2012-02-01T14:49:33Z\"}"], ["updated_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00]]
208
+ SQLite3::SQLException: table cart_items has no column named item_id: INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?)
209
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
210
+  (0.0ms) SAVEPOINT active_record_1
211
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00]]
212
+  (0.0ms) RELEASE SAVEPOINT active_record_1
213
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
214
+  (0.0ms) SAVEPOINT active_record_1
215
+ SQL (0.3ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00]]
216
+  (0.0ms) RELEASE SAVEPOINT active_record_1
217
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 2]]
218
+  (0.0ms) SAVEPOINT active_record_1
219
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["price", 15.99], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00]]
220
+  (0.0ms) RELEASE SAVEPOINT active_record_1
221
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
222
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 2
223
+  (0.0ms) SAVEPOINT active_record_1
224
+ SQL (0.1ms) INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["cart_id", 2], ["created_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["item_id", nil], ["quantity", 1], ["raw_item", "{\"id\":1,\"price\":15.99,\"title\":\"MyString\",\"created_at\":\"2012-02-01T14:49:33Z\",\"updated_at\":\"2012-02-01T14:49:33Z\"}"], ["updated_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00]]
225
+ SQLite3::SQLException: table cart_items has no column named item_id: INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?)
226
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
227
+  (0.0ms) SAVEPOINT active_record_1
228
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00]]
229
+  (0.0ms) RELEASE SAVEPOINT active_record_1
230
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
231
+  (0.0ms) SAVEPOINT active_record_1
232
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00]]
233
+  (0.0ms) RELEASE SAVEPOINT active_record_1
234
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 2]]
235
+  (0.0ms) SAVEPOINT active_record_1
236
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["price", 15.99], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00]]
237
+  (0.0ms) RELEASE SAVEPOINT active_record_1
238
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
239
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 2
240
+  (0.0ms) SAVEPOINT active_record_1
241
+ SQL (0.1ms) INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["cart_id", 2], ["created_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["item_id", nil], ["quantity", 1], ["raw_item", "{\"id\":1,\"price\":15.99,\"title\":\"MyString\",\"created_at\":\"2012-02-01T14:49:33Z\",\"updated_at\":\"2012-02-01T14:49:33Z\"}"], ["updated_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00]]
242
+ SQLite3::SQLException: table cart_items has no column named item_id: INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?)
243
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
244
+  (0.0ms) SAVEPOINT active_record_1
245
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:33 UTC +00:00]]
246
+  (0.0ms) RELEASE SAVEPOINT active_record_1
247
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
248
+
249
+
250
+ Started GET "/cart" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
251
+ Processing by ShopBunny::CartsController#show as HTML
252
+  (0.1ms) SAVEPOINT active_record_1
253
+ SQL (0.3ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
254
+  (0.0ms) RELEASE SAVEPOINT active_record_1
255
+ Item Load (0.1ms) SELECT "items".* FROM "items" LIMIT 10
256
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
257
+ ShopBunny::Coupon Load (0.2ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
258
+  (0.1ms) SELECT SUM("coupons"."discount_credit") AS sum_id FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
259
+ Completed 200 OK in 34ms (Views: 31.2ms | ActiveRecord: 0.9ms)
260
+  (0.0ms) SAVEPOINT active_record_1
261
+ SQL (0.3ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
262
+  (0.0ms) RELEASE SAVEPOINT active_record_1
263
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
264
+
265
+
266
+ Started GET "/cart" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
267
+ Processing by ShopBunny::CartsController#show as HTML
268
+  (0.0ms) SAVEPOINT active_record_1
269
+ SQL (0.3ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
270
+  (0.0ms) RELEASE SAVEPOINT active_record_1
271
+ Item Load (0.1ms) SELECT "items".* FROM "items" LIMIT 10
272
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
273
+ ShopBunny::Coupon Load (0.2ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
274
+  (0.1ms) SELECT SUM("coupons"."discount_credit") AS sum_id FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
275
+ Completed 200 OK in 7ms (Views: 5.3ms | ActiveRecord: 0.7ms)
276
+
277
+
278
+ Started GET "/cart/add_item?item_id=1" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
279
+ Processing by ShopBunny::CartsController#add_item as HTML
280
+ Parameters: {"item_id"=>"1"}
281
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
282
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]]
283
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
284
+  (0.0ms) SAVEPOINT active_record_1
285
+ SQL (0.2ms) INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["cart_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["item_id", nil], ["quantity", 1], ["raw_item", "{\"id\":1,\"price\":10.0,\"title\":\"MyString\",\"created_at\":\"2012-02-01T14:49:34Z\",\"updated_at\":\"2012-02-01T14:49:34Z\"}"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
286
+ SQLite3::SQLException: table cart_items has no column named item_id: INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?)
287
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
288
+ Completed 500 Internal Server Error in 3ms
289
+  (0.0ms) SAVEPOINT active_record_1
290
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
291
+  (0.0ms) RELEASE SAVEPOINT active_record_1
292
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
293
+
294
+
295
+ Started GET "/cart" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
296
+ Processing by ShopBunny::CartsController#show as HTML
297
+  (0.0ms) SAVEPOINT active_record_1
298
+ SQL (0.3ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
299
+  (0.0ms) RELEASE SAVEPOINT active_record_1
300
+ Item Load (0.1ms) SELECT "items".* FROM "items" LIMIT 10
301
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
302
+ ShopBunny::Coupon Load (0.1ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
303
+  (0.1ms) SELECT SUM("coupons"."discount_credit") AS sum_id FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
304
+ Completed 200 OK in 7ms (Views: 5.0ms | ActiveRecord: 0.7ms)
305
+
306
+
307
+ Started GET "/cart/add_item?item_id=1" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
308
+ Processing by ShopBunny::CartsController#add_item as HTML
309
+ Parameters: {"item_id"=>"1"}
310
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
311
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]]
312
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
313
+  (0.0ms) SAVEPOINT active_record_1
314
+ SQL (0.2ms) INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["cart_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["item_id", nil], ["quantity", 1], ["raw_item", "{\"id\":1,\"price\":10.0,\"title\":\"MyString\",\"created_at\":\"2012-02-01T14:49:34Z\",\"updated_at\":\"2012-02-01T14:49:34Z\"}"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
315
+ SQLite3::SQLException: table cart_items has no column named item_id: INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?)
316
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
317
+ Completed 500 Internal Server Error in 3ms
318
+  (0.0ms) SAVEPOINT active_record_1
319
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
320
+  (0.0ms) RELEASE SAVEPOINT active_record_1
321
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
322
+
323
+
324
+ Started GET "/cart" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
325
+ Processing by ShopBunny::CartsController#show as HTML
326
+  (0.0ms) SAVEPOINT active_record_1
327
+ SQL (0.3ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
328
+  (0.0ms) RELEASE SAVEPOINT active_record_1
329
+ Item Load (0.1ms) SELECT "items".* FROM "items" LIMIT 10
330
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
331
+ ShopBunny::Coupon Load (0.1ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
332
+  (0.1ms) SELECT SUM("coupons"."discount_credit") AS sum_id FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
333
+ Completed 200 OK in 7ms (Views: 5.2ms | ActiveRecord: 0.7ms)
334
+
335
+
336
+ Started GET "/cart/add_item?item_id=1" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
337
+ Processing by ShopBunny::CartsController#add_item as HTML
338
+ Parameters: {"item_id"=>"1"}
339
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
340
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]]
341
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
342
+  (0.0ms) SAVEPOINT active_record_1
343
+ SQL (0.2ms) INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["cart_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["item_id", nil], ["quantity", 1], ["raw_item", "{\"id\":1,\"price\":10.0,\"title\":\"MyString\",\"created_at\":\"2012-02-01T14:49:34Z\",\"updated_at\":\"2012-02-01T14:49:34Z\"}"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
344
+ SQLite3::SQLException: table cart_items has no column named item_id: INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?)
345
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
346
+ Completed 500 Internal Server Error in 3ms
347
+  (0.0ms) SAVEPOINT active_record_1
348
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
349
+  (0.0ms) RELEASE SAVEPOINT active_record_1
350
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
351
+
352
+
353
+ Started GET "/cart" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
354
+ Processing by ShopBunny::CartsController#show as HTML
355
+  (0.0ms) SAVEPOINT active_record_1
356
+ SQL (0.3ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
357
+  (0.0ms) RELEASE SAVEPOINT active_record_1
358
+ Item Load (0.1ms) SELECT "items".* FROM "items" LIMIT 10
359
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
360
+ ShopBunny::Coupon Load (0.1ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
361
+  (0.1ms) SELECT SUM("coupons"."discount_credit") AS sum_id FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
362
+ Completed 200 OK in 7ms (Views: 5.1ms | ActiveRecord: 0.7ms)
363
+
364
+
365
+ Started GET "/cart/add_item?item_id=1" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
366
+ Processing by ShopBunny::CartsController#add_item as HTML
367
+ Parameters: {"item_id"=>"1"}
368
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
369
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", "1"]]
370
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
371
+  (0.0ms) SAVEPOINT active_record_1
372
+ SQL (0.2ms) INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["cart_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["item_id", nil], ["quantity", 1], ["raw_item", "{\"id\":1,\"price\":10.0,\"title\":\"MyString\",\"created_at\":\"2012-02-01T14:49:34Z\",\"updated_at\":\"2012-02-01T14:49:34Z\"}"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
373
+ SQLite3::SQLException: table cart_items has no column named item_id: INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?)
374
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
375
+ Completed 500 Internal Server Error in 3ms
376
+  (0.0ms) SAVEPOINT active_record_1
377
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
378
+  (0.0ms) RELEASE SAVEPOINT active_record_1
379
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
380
+
381
+
382
+ Started GET "/cart" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
383
+ Processing by ShopBunny::CartsController#show as HTML
384
+  (0.0ms) SAVEPOINT active_record_1
385
+ SQL (0.3ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
386
+  (0.0ms) RELEASE SAVEPOINT active_record_1
387
+ Item Load (0.1ms) SELECT "items".* FROM "items" LIMIT 10
388
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
389
+ ShopBunny::Coupon Load (0.1ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
390
+  (0.1ms) SELECT SUM("coupons"."discount_credit") AS sum_id FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
391
+ Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.7ms)
392
+  (0.0ms) SAVEPOINT active_record_1
393
+  (0.0ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode1.0627048802030585' LIMIT 1
394
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode1.0627048802030585"], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
395
+  (0.0ms) RELEASE SAVEPOINT active_record_1
396
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
397
+
398
+
399
+ Started PUT "/cart" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
400
+ Processing by ShopBunny::CartsController#update as HTML
401
+ Parameters: {"utf8"=>"✓", "cart"=>{"coupon_code"=>"secretcode1.0627048802030585"}, "commit"=>"Add coupon"}
402
+ Cart Load (0.1ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
403
+  (0.0ms) SAVEPOINT active_record_1
404
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'secretcode1.0627048802030585' LIMIT 1
405
+ CACHE (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'secretcode1.0627048802030585' LIMIT 1
406
+ SQL (0.2ms) INSERT INTO "coupon_uses" ("cart_id", "coupon_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["cart_id", 1], ["coupon_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
407
+  (0.0ms) RELEASE SAVEPOINT active_record_1
408
+ Redirected to http://www.example.com/cart
409
+ Completed 302 Found in 4ms
410
+
411
+
412
+ Started GET "/cart" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
413
+ Processing by ShopBunny::CartsController#show as HTML
414
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
415
+ Item Load (0.1ms) SELECT "items".* FROM "items" LIMIT 10
416
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
417
+ ShopBunny::Coupon Load (0.1ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
418
+  (0.1ms) SELECT SUM("coupons"."discount_credit") AS sum_id FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
419
+ Completed 200 OK in 6ms (Views: 4.8ms | ActiveRecord: 0.4ms)
420
+  (0.0ms) SAVEPOINT active_record_1
421
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
422
+  (0.0ms) RELEASE SAVEPOINT active_record_1
423
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
424
+
425
+
426
+ Started GET "/cart" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
427
+ Processing by ShopBunny::CartsController#show as HTML
428
+  (0.0ms) SAVEPOINT active_record_1
429
+ SQL (0.3ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
430
+  (0.0ms) RELEASE SAVEPOINT active_record_1
431
+ Item Load (0.1ms) SELECT "items".* FROM "items" LIMIT 10
432
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
433
+ ShopBunny::Coupon Load (0.1ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
434
+  (0.1ms) SELECT SUM("coupons"."discount_credit") AS sum_id FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
435
+ Completed 200 OK in 7ms (Views: 5.1ms | ActiveRecord: 0.7ms)
436
+  (0.0ms) SAVEPOINT active_record_1
437
+  (0.0ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode1.6541675558143807' LIMIT 1
438
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode1.6541675558143807"], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", 1], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
439
+  (0.0ms) RELEASE SAVEPOINT active_record_1
440
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
441
+
442
+
443
+ Started PUT "/cart" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
444
+ Processing by ShopBunny::CartsController#update as HTML
445
+ Parameters: {"utf8"=>"✓", "cart"=>{"coupon_code"=>"secretcode1.6541675558143807"}, "commit"=>"Add coupon"}
446
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
447
+  (0.0ms) SAVEPOINT active_record_1
448
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'secretcode1.6541675558143807' LIMIT 1
449
+  (0.1ms) SELECT COUNT(*) FROM "coupon_uses" WHERE "coupon_uses"."coupon_id" = 1
450
+ CACHE (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'secretcode1.6541675558143807' LIMIT 1
451
+ CACHE (0.0ms) SELECT COUNT(*) FROM "coupon_uses" WHERE "coupon_uses"."coupon_id" = 1
452
+ SQL (0.1ms) INSERT INTO "coupon_uses" ("cart_id", "coupon_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["cart_id", 1], ["coupon_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
453
+  (0.0ms) RELEASE SAVEPOINT active_record_1
454
+ Redirected to http://www.example.com/cart
455
+ Completed 302 Found in 7ms
456
+
457
+
458
+ Started GET "/cart" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
459
+ Processing by ShopBunny::CartsController#show as HTML
460
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
461
+ Item Load (0.1ms) SELECT "items".* FROM "items" LIMIT 10
462
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
463
+ ShopBunny::Coupon Load (0.1ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
464
+  (0.1ms) SELECT SUM("coupons"."discount_credit") AS sum_id FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
465
+ Completed 200 OK in 5ms (Views: 4.6ms | ActiveRecord: 0.4ms)
466
+  (0.0ms) SAVEPOINT active_record_1
467
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
468
+  (0.0ms) RELEASE SAVEPOINT active_record_1
469
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
470
+
471
+
472
+ Started GET "/cart" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
473
+ Processing by ShopBunny::CartsController#show as HTML
474
+  (0.0ms) SAVEPOINT active_record_1
475
+ SQL (0.3ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
476
+  (0.0ms) RELEASE SAVEPOINT active_record_1
477
+ Item Load (0.1ms) SELECT "items".* FROM "items" LIMIT 10
478
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
479
+ ShopBunny::Coupon Load (0.1ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
480
+  (0.1ms) SELECT SUM("coupons"."discount_credit") AS sum_id FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
481
+ Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.7ms)
482
+  (0.0ms) SAVEPOINT active_record_1
483
+  (0.0ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode2.0004888175443867' LIMIT 1
484
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode2.0004888175443867"], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "New Coupon"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
485
+  (0.0ms) RELEASE SAVEPOINT active_record_1
486
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
487
+
488
+
489
+ Started PUT "/cart" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
490
+ Processing by ShopBunny::CartsController#update as HTML
491
+ Parameters: {"utf8"=>"✓", "cart"=>{"coupon_code"=>"secretcode2.0004888175443867"}, "commit"=>"Add coupon"}
492
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
493
+  (0.0ms) SAVEPOINT active_record_1
494
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'secretcode2.0004888175443867' LIMIT 1
495
+ CACHE (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'secretcode2.0004888175443867' LIMIT 1
496
+ SQL (0.2ms) INSERT INTO "coupon_uses" ("cart_id", "coupon_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["cart_id", 1], ["coupon_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
497
+  (0.0ms) RELEASE SAVEPOINT active_record_1
498
+ Redirected to http://www.example.com/cart
499
+ Completed 302 Found in 3ms
500
+
501
+
502
+ Started GET "/cart" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
503
+ Processing by ShopBunny::CartsController#show as HTML
504
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
505
+ Item Load (0.1ms) SELECT "items".* FROM "items" LIMIT 10
506
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
507
+ ShopBunny::Coupon Load (0.1ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
508
+  (0.1ms) SELECT SUM("coupons"."discount_credit") AS sum_id FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
509
+ Completed 200 OK in 5ms (Views: 4.5ms | ActiveRecord: 0.3ms)
510
+  (0.0ms) SAVEPOINT active_record_1
511
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
512
+  (0.0ms) RELEASE SAVEPOINT active_record_1
513
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
514
+
515
+
516
+ Started GET "/cart" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
517
+ Processing by ShopBunny::CartsController#show as HTML
518
+  (0.0ms) SAVEPOINT active_record_1
519
+ SQL (0.3ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
520
+  (0.0ms) RELEASE SAVEPOINT active_record_1
521
+ Item Load (0.1ms) SELECT "items".* FROM "items" LIMIT 10
522
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
523
+ ShopBunny::Coupon Load (0.1ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
524
+  (0.1ms) SELECT SUM("coupons"."discount_credit") AS sum_id FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
525
+ Completed 200 OK in 35ms (Views: 33.0ms | ActiveRecord: 0.7ms)
526
+  (0.1ms) SAVEPOINT active_record_1
527
+  (0.1ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode2.002831442008136' LIMIT 1
528
+ SQL (0.5ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode2.002831442008136"], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["discount_credit", 5.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
529
+  (0.0ms) RELEASE SAVEPOINT active_record_1
530
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
531
+
532
+
533
+ Started PUT "/cart" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
534
+ Processing by ShopBunny::CartsController#update as HTML
535
+ Parameters: {"utf8"=>"✓", "cart"=>{"coupon_code"=>"secretcode2.002831442008136"}, "commit"=>"Add coupon"}
536
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
537
+  (0.0ms) SAVEPOINT active_record_1
538
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'secretcode2.002831442008136' LIMIT 1
539
+ CACHE (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'secretcode2.002831442008136' LIMIT 1
540
+ SQL (0.2ms) INSERT INTO "coupon_uses" ("cart_id", "coupon_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["cart_id", 1], ["coupon_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
541
+  (0.0ms) RELEASE SAVEPOINT active_record_1
542
+ Redirected to http://www.example.com/cart
543
+ Completed 302 Found in 4ms
544
+
545
+
546
+ Started GET "/cart" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
547
+ Processing by ShopBunny::CartsController#show as HTML
548
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
549
+ Item Load (0.1ms) SELECT "items".* FROM "items" LIMIT 10
550
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
551
+ ShopBunny::Coupon Load (0.2ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
552
+  (0.1ms) SELECT SUM("coupons"."discount_credit") AS sum_id FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
553
+ Completed 200 OK in 6ms (Views: 4.7ms | ActiveRecord: 0.4ms)
554
+  (0.0ms) SAVEPOINT active_record_1
555
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
556
+  (0.0ms) RELEASE SAVEPOINT active_record_1
557
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
558
+
559
+
560
+ Started GET "/cart" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
561
+ Processing by ShopBunny::CartsController#show as HTML
562
+  (0.0ms) SAVEPOINT active_record_1
563
+ SQL (0.3ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
564
+  (0.0ms) RELEASE SAVEPOINT active_record_1
565
+ Item Load (0.1ms) SELECT "items".* FROM "items" LIMIT 10
566
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
567
+ ShopBunny::Coupon Load (0.1ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
568
+  (0.1ms) SELECT SUM("coupons"."discount_credit") AS sum_id FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
569
+ Completed 200 OK in 7ms (Views: 4.8ms | ActiveRecord: 0.7ms)
570
+  (0.0ms) SAVEPOINT active_record_1
571
+  (0.0ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode2.100008331429333' LIMIT 1
572
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode2.100008331429333"], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["discount_credit", 10.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
573
+  (0.0ms) RELEASE SAVEPOINT active_record_1
574
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
575
+
576
+
577
+ Started PUT "/cart" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
578
+ Processing by ShopBunny::CartsController#update as HTML
579
+ Parameters: {"utf8"=>"✓", "cart"=>{"coupon_code"=>"secretcode2.100008331429333"}, "commit"=>"Add coupon"}
580
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
581
+  (0.0ms) SAVEPOINT active_record_1
582
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'secretcode2.100008331429333' LIMIT 1
583
+ CACHE (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'secretcode2.100008331429333' LIMIT 1
584
+ SQL (0.1ms) INSERT INTO "coupon_uses" ("cart_id", "coupon_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["cart_id", 1], ["coupon_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
585
+  (0.0ms) RELEASE SAVEPOINT active_record_1
586
+ Redirected to http://www.example.com/cart
587
+ Completed 302 Found in 3ms
588
+
589
+
590
+ Started GET "/cart" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
591
+ Processing by ShopBunny::CartsController#show as HTML
592
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
593
+ Item Load (0.1ms) SELECT "items".* FROM "items" LIMIT 10
594
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
595
+ ShopBunny::Coupon Load (0.1ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
596
+  (0.1ms) SELECT SUM("coupons"."discount_credit") AS sum_id FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
597
+ Completed 200 OK in 5ms (Views: 4.4ms | ActiveRecord: 0.3ms)
598
+  (0.0ms) SAVEPOINT active_record_1
599
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
600
+  (0.0ms) RELEASE SAVEPOINT active_record_1
601
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
602
+
603
+
604
+ Started GET "/cart" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
605
+ Processing by ShopBunny::CartsController#show as HTML
606
+  (0.0ms) SAVEPOINT active_record_1
607
+ SQL (0.3ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
608
+  (0.0ms) RELEASE SAVEPOINT active_record_1
609
+ Item Load (0.1ms) SELECT "items".* FROM "items" LIMIT 10
610
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
611
+ ShopBunny::Coupon Load (0.1ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
612
+  (0.1ms) SELECT SUM("coupons"."discount_credit") AS sum_id FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
613
+ Completed 200 OK in 7ms (Views: 5.1ms | ActiveRecord: 0.7ms)
614
+
615
+
616
+ Started PUT "/cart" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
617
+ Processing by ShopBunny::CartsController#update as HTML
618
+ Parameters: {"utf8"=>"✓", "cart"=>{"coupon_code"=>"unknown"}, "commit"=>"Add coupon"}
619
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
620
+  (0.0ms) SAVEPOINT active_record_1
621
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'unknown' LIMIT 1
622
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
623
+ Item Load (0.1ms) SELECT "items".* FROM "items" LIMIT 10
624
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
625
+ ShopBunny::Coupon Load (0.1ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
626
+  (0.1ms) SELECT SUM("coupons"."discount_credit") AS sum_id FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
627
+ Completed 200 OK in 6ms (Views: 4.5ms | ActiveRecord: 0.5ms)
628
+  (0.0ms) SAVEPOINT active_record_1
629
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
630
+  (0.0ms) RELEASE SAVEPOINT active_record_1
631
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
632
+
633
+
634
+ Started GET "/cart" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
635
+ Processing by ShopBunny::CartsController#show as HTML
636
+  (0.0ms) SAVEPOINT active_record_1
637
+ SQL (0.3ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
638
+  (0.0ms) RELEASE SAVEPOINT active_record_1
639
+ Item Load (0.1ms) SELECT "items".* FROM "items" LIMIT 10
640
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
641
+ ShopBunny::Coupon Load (0.1ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
642
+  (0.1ms) SELECT SUM("coupons"."discount_credit") AS sum_id FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
643
+ Completed 200 OK in 7ms (Views: 4.8ms | ActiveRecord: 0.7ms)
644
+  (0.0ms) SAVEPOINT active_record_1
645
+  (0.1ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'daterange2.7912229570184808' LIMIT 1
646
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "daterange2.7912229570184808"], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "Datumscoupon"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["valid_from", Sun, 29 Jan 2012 14:49:34 UTC +00:00], ["valid_until", Mon, 30 Jan 2012 14:49:34 UTC +00:00], ["value_of_automatic_add", nil]]
647
+  (0.0ms) RELEASE SAVEPOINT active_record_1
648
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
649
+
650
+
651
+ Started PUT "/cart" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
652
+ Processing by ShopBunny::CartsController#update as HTML
653
+ Parameters: {"utf8"=>"✓", "cart"=>{"coupon_code"=>"daterange2.7912229570184808"}, "commit"=>"Add coupon"}
654
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
655
+  (0.0ms) SAVEPOINT active_record_1
656
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'daterange2.7912229570184808' LIMIT 1
657
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
658
+ Item Load (0.1ms) SELECT "items".* FROM "items" LIMIT 10
659
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
660
+ ShopBunny::Coupon Load (0.1ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
661
+  (0.1ms) SELECT SUM("coupons"."discount_credit") AS sum_id FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
662
+ Completed 200 OK in 7ms (Views: 4.6ms | ActiveRecord: 0.5ms)
663
+  (0.0ms) SAVEPOINT active_record_1
664
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
665
+  (0.0ms) RELEASE SAVEPOINT active_record_1
666
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
667
+
668
+
669
+ Started GET "/cart" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
670
+ Processing by ShopBunny::CartsController#show as HTML
671
+  (0.0ms) SAVEPOINT active_record_1
672
+ SQL (0.3ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
673
+  (0.0ms) RELEASE SAVEPOINT active_record_1
674
+ Item Load (0.1ms) SELECT "items".* FROM "items" LIMIT 10
675
+ ShopBunny::CartItem Load (0.2ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
676
+ ShopBunny::Coupon Load (0.1ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
677
+  (0.1ms) SELECT SUM("coupons"."discount_credit") AS sum_id FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
678
+ Completed 200 OK in 36ms (Views: 34.0ms | ActiveRecord: 0.8ms)
679
+  (0.0ms) SAVEPOINT active_record_1
680
+  (0.0ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode3.4867368541239934' LIMIT 1
681
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode3.4867368541239934"], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", 1], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
682
+  (0.0ms) RELEASE SAVEPOINT active_record_1
683
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
684
+
685
+
686
+ Started PUT "/cart" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
687
+ Processing by ShopBunny::CartsController#update as HTML
688
+ Parameters: {"utf8"=>"✓", "cart"=>{"coupon_code"=>"secretcode3.4867368541239934"}, "commit"=>"Add coupon"}
689
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
690
+  (0.0ms) SAVEPOINT active_record_1
691
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'secretcode3.4867368541239934' LIMIT 1
692
+  (0.0ms) SELECT COUNT(*) FROM "coupon_uses" WHERE "coupon_uses"."coupon_id" = 1
693
+ CACHE (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'secretcode3.4867368541239934' LIMIT 1
694
+ CACHE (0.0ms) SELECT COUNT(*) FROM "coupon_uses" WHERE "coupon_uses"."coupon_id" = 1
695
+ SQL (0.1ms) INSERT INTO "coupon_uses" ("cart_id", "coupon_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["cart_id", 1], ["coupon_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
696
+  (0.0ms) RELEASE SAVEPOINT active_record_1
697
+ Redirected to http://www.example.com/cart
698
+ Completed 302 Found in 4ms
699
+
700
+
701
+ Started GET "/cart" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
702
+ Processing by ShopBunny::CartsController#show as HTML
703
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
704
+ Item Load (0.1ms) SELECT "items".* FROM "items" LIMIT 10
705
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
706
+ ShopBunny::Coupon Load (0.1ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
707
+  (0.1ms) SELECT SUM("coupons"."discount_credit") AS sum_id FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
708
+ Completed 200 OK in 6ms (Views: 4.8ms | ActiveRecord: 0.4ms)
709
+
710
+
711
+ Started GET "/cart" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
712
+ Processing by ShopBunny::CartsController#show as HTML
713
+  (0.0ms) SAVEPOINT active_record_1
714
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
715
+  (0.0ms) RELEASE SAVEPOINT active_record_1
716
+ Item Load (0.1ms) SELECT "items".* FROM "items" LIMIT 10
717
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 2
718
+ ShopBunny::Coupon Load (0.1ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 2
719
+  (0.1ms) SELECT SUM("coupons"."discount_credit") AS sum_id FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 2
720
+ Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.6ms)
721
+
722
+
723
+ Started PUT "/cart" for 127.0.0.1 at 2012-02-01 15:49:34 +0100
724
+ Processing by ShopBunny::CartsController#update as HTML
725
+ Parameters: {"utf8"=>"✓", "cart"=>{"coupon_code"=>"secretcode3.4867368541239934"}, "commit"=>"Add coupon"}
726
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 2]]
727
+  (0.0ms) SAVEPOINT active_record_1
728
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'secretcode3.4867368541239934' LIMIT 1
729
+  (0.0ms) SELECT COUNT(*) FROM "coupon_uses" WHERE "coupon_uses"."coupon_id" = 1
730
+  (0.1ms) SELECT 1 FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 2 AND "coupons"."id" = 1 LIMIT 1
731
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
732
+ Item Load (0.1ms) SELECT "items".* FROM "items" LIMIT 10
733
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 2
734
+ ShopBunny::Coupon Load (0.2ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 2
735
+  (0.1ms) SELECT SUM("coupons"."discount_credit") AS sum_id FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 2
736
+ Completed 200 OK in 8ms (Views: 4.4ms | ActiveRecord: 0.6ms)
737
+  (0.0ms) SAVEPOINT active_record_1
738
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
739
+  (0.0ms) RELEASE SAVEPOINT active_record_1
740
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
741
+  (0.0ms) SAVEPOINT active_record_1
742
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 20.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
743
+  (0.0ms) RELEASE SAVEPOINT active_record_1
744
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 2]]
745
+  (0.0ms) SAVEPOINT active_record_1
746
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
747
+  (0.0ms) RELEASE SAVEPOINT active_record_1
748
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
749
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
750
+  (0.0ms) SAVEPOINT active_record_1
751
+ SQL (0.1ms) INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["cart_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["item_id", nil], ["quantity", 1], ["raw_item", "{\"id\":1,\"price\":10.0,\"title\":\"MyString\",\"created_at\":\"2012-02-01T14:49:34Z\",\"updated_at\":\"2012-02-01T14:49:34Z\"}"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
752
+ SQLite3::SQLException: table cart_items has no column named item_id: INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?)
753
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
754
+  (0.0ms) SAVEPOINT active_record_1
755
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
756
+  (0.0ms) RELEASE SAVEPOINT active_record_1
757
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
758
+  (0.0ms) SAVEPOINT active_record_1
759
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 20.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
760
+  (0.0ms) RELEASE SAVEPOINT active_record_1
761
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 2]]
762
+  (0.0ms) SAVEPOINT active_record_1
763
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
764
+  (0.0ms) RELEASE SAVEPOINT active_record_1
765
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
766
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
767
+  (0.0ms) SAVEPOINT active_record_1
768
+ SQL (0.1ms) INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["cart_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["item_id", nil], ["quantity", 1], ["raw_item", "{\"id\":1,\"price\":10.0,\"title\":\"MyString\",\"created_at\":\"2012-02-01T14:49:34Z\",\"updated_at\":\"2012-02-01T14:49:34Z\"}"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
769
+ SQLite3::SQLException: table cart_items has no column named item_id: INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?)
770
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
771
+  (0.0ms) SAVEPOINT active_record_1
772
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
773
+  (0.0ms) RELEASE SAVEPOINT active_record_1
774
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
775
+  (0.0ms) SAVEPOINT active_record_1
776
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 20.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
777
+  (0.0ms) RELEASE SAVEPOINT active_record_1
778
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 2]]
779
+  (0.0ms) SAVEPOINT active_record_1
780
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
781
+  (0.0ms) RELEASE SAVEPOINT active_record_1
782
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
783
+ ShopBunny::Coupon Load (0.2ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
784
+  (0.0ms) SAVEPOINT active_record_1
785
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
786
+  (0.0ms) RELEASE SAVEPOINT active_record_1
787
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
788
+  (0.0ms) SAVEPOINT active_record_1
789
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 20.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
790
+  (0.0ms) RELEASE SAVEPOINT active_record_1
791
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 2]]
792
+  (0.0ms) SAVEPOINT active_record_1
793
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
794
+  (0.0ms) RELEASE SAVEPOINT active_record_1
795
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
796
+  (0.0ms) SAVEPOINT active_record_1
797
+  (0.0ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode4.357966484609922' LIMIT 1
798
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode4.357966484609922"], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["discount_credit", 110.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
799
+  (0.0ms) RELEASE SAVEPOINT active_record_1
800
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
801
+  (0.0ms) SAVEPOINT active_record_1
802
+ SQL (0.1ms) INSERT INTO "coupon_uses" ("cart_id", "coupon_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["cart_id", 1], ["coupon_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
803
+  (0.0ms) RELEASE SAVEPOINT active_record_1
804
+  (0.1ms) SELECT SUM("coupons"."discount_credit") AS sum_id FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
805
+ ShopBunny::Coupon Load (0.1ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
806
+  (0.0ms) SAVEPOINT active_record_1
807
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
808
+  (0.0ms) RELEASE SAVEPOINT active_record_1
809
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
810
+  (0.0ms) SAVEPOINT active_record_1
811
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 20.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
812
+  (0.0ms) RELEASE SAVEPOINT active_record_1
813
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 2]]
814
+  (0.0ms) SAVEPOINT active_record_1
815
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
816
+  (0.0ms) RELEASE SAVEPOINT active_record_1
817
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
818
+  (0.0ms) SAVEPOINT active_record_1
819
+  (0.0ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode4.649895558157858' LIMIT 1
820
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode4.649895558157858"], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
821
+  (0.0ms) RELEASE SAVEPOINT active_record_1
822
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
823
+  (0.1ms) SELECT COUNT(DISTINCT "coupons"."id") FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
824
+  (0.0ms) SAVEPOINT active_record_1
825
+ SQL (0.1ms) INSERT INTO "coupon_uses" ("cart_id", "coupon_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["cart_id", 1], ["coupon_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
826
+  (0.0ms) RELEASE SAVEPOINT active_record_1
827
+  (0.1ms) SELECT COUNT(DISTINCT "coupons"."id") FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
828
+  (0.0ms) SELECT COUNT(*) FROM "coupon_uses"
829
+  (0.0ms) SAVEPOINT active_record_1
830
+ SQL (0.1ms) INSERT INTO "coupon_uses" ("cart_id", "coupon_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["cart_id", 1], ["coupon_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
831
+  (0.0ms) RELEASE SAVEPOINT active_record_1
832
+  (0.0ms) SELECT COUNT(*) FROM "coupon_uses"
833
+  (0.0ms) SAVEPOINT active_record_1
834
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
835
+  (0.0ms) RELEASE SAVEPOINT active_record_1
836
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
837
+  (0.0ms) SAVEPOINT active_record_1
838
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 20.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
839
+  (0.0ms) RELEASE SAVEPOINT active_record_1
840
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 2]]
841
+  (0.0ms) SAVEPOINT active_record_1
842
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
843
+  (0.0ms) RELEASE SAVEPOINT active_record_1
844
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
845
+  (0.0ms) SAVEPOINT active_record_1
846
+  (0.1ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode5.519196833734834' LIMIT 1
847
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode5.519196833734834"], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
848
+  (0.0ms) RELEASE SAVEPOINT active_record_1
849
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
850
+  (0.1ms) SELECT COUNT(DISTINCT "coupons"."id") FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
851
+  (0.0ms) SAVEPOINT active_record_1
852
+ SQL (0.1ms) INSERT INTO "coupon_uses" ("cart_id", "coupon_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["cart_id", 1], ["coupon_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
853
+  (0.0ms) RELEASE SAVEPOINT active_record_1
854
+  (0.0ms) SAVEPOINT active_record_1
855
+ SQL (0.1ms) INSERT INTO "coupon_uses" ("cart_id", "coupon_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["cart_id", 1], ["coupon_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
856
+  (0.0ms) RELEASE SAVEPOINT active_record_1
857
+  (0.1ms) SELECT COUNT(DISTINCT "coupons"."id") FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
858
+  (0.0ms) SAVEPOINT active_record_1
859
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
860
+  (0.0ms) RELEASE SAVEPOINT active_record_1
861
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
862
+  (0.0ms) SAVEPOINT active_record_1
863
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 20.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
864
+  (0.0ms) RELEASE SAVEPOINT active_record_1
865
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 2]]
866
+  (0.0ms) SAVEPOINT active_record_1
867
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
868
+  (0.0ms) RELEASE SAVEPOINT active_record_1
869
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
870
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
871
+ ShopBunny::Coupon Load (0.1ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
872
+  (0.0ms) SAVEPOINT active_record_1
873
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
874
+  (0.0ms) RELEASE SAVEPOINT active_record_1
875
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
876
+  (0.0ms) SAVEPOINT active_record_1
877
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 20.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
878
+  (0.0ms) RELEASE SAVEPOINT active_record_1
879
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 2]]
880
+  (0.0ms) SAVEPOINT active_record_1
881
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
882
+  (0.0ms) RELEASE SAVEPOINT active_record_1
883
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
884
+  (0.0ms) SAVEPOINT active_record_1
885
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 15.99], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
886
+  (0.0ms) RELEASE SAVEPOINT active_record_1
887
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 3]]
888
+  (0.0ms) SAVEPOINT active_record_1
889
+  (0.0ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode5.623885864651297' LIMIT 1
890
+ SQL (0.3ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", 3], ["code", "secretcode5.623885864651297"], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
891
+  (0.0ms) RELEASE SAVEPOINT active_record_1
892
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
893
+  (0.0ms) SAVEPOINT active_record_1
894
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'secretcode5.623885864651297' LIMIT 1
895
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'secretcode5.623885864651297' LIMIT 1
896
+ SQL (0.1ms) INSERT INTO "coupon_uses" ("cart_id", "coupon_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["cart_id", 1], ["coupon_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
897
+  (0.0ms) RELEASE SAVEPOINT active_record_1
898
+  (0.0ms) SELECT COUNT(*) FROM "cart_items" WHERE "cart_items"."cart_id" = 1
899
+ ShopBunny::Coupon Load (0.1ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
900
+ Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = 3 LIMIT 1
901
+  (0.0ms) SAVEPOINT active_record_1
902
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
903
+  (0.0ms) RELEASE SAVEPOINT active_record_1
904
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
905
+  (0.0ms) SAVEPOINT active_record_1
906
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 20.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
907
+  (0.0ms) RELEASE SAVEPOINT active_record_1
908
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 2]]
909
+  (0.0ms) SAVEPOINT active_record_1
910
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
911
+  (0.0ms) RELEASE SAVEPOINT active_record_1
912
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
913
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
914
+  (0.0ms) SAVEPOINT active_record_1
915
+ SQL (0.1ms) INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["cart_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["item_id", nil], ["quantity", 10], ["raw_item", "{\"id\":1,\"price\":10.0,\"title\":\"MyString\",\"created_at\":\"2012-02-01T14:49:34Z\",\"updated_at\":\"2012-02-01T14:49:34Z\"}"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
916
+ SQLite3::SQLException: table cart_items has no column named item_id: INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?)
917
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
918
+  (0.0ms) SAVEPOINT active_record_1
919
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
920
+  (0.0ms) RELEASE SAVEPOINT active_record_1
921
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
922
+  (0.0ms) SAVEPOINT active_record_1
923
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 20.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
924
+  (0.0ms) RELEASE SAVEPOINT active_record_1
925
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 2]]
926
+  (0.0ms) SAVEPOINT active_record_1
927
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
928
+  (0.0ms) RELEASE SAVEPOINT active_record_1
929
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
930
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
931
+  (0.0ms) SAVEPOINT active_record_1
932
+ SQL (0.1ms) INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["cart_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["item_id", nil], ["quantity", 10], ["raw_item", "{\"id\":1,\"price\":10.0,\"title\":\"MyString\",\"created_at\":\"2012-02-01T14:49:34Z\",\"updated_at\":\"2012-02-01T14:49:34Z\"}"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
933
+ SQLite3::SQLException: table cart_items has no column named item_id: INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?)
934
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
935
+  (0.0ms) SAVEPOINT active_record_1
936
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
937
+  (0.0ms) RELEASE SAVEPOINT active_record_1
938
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
939
+  (0.0ms) SAVEPOINT active_record_1
940
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 20.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
941
+  (0.0ms) RELEASE SAVEPOINT active_record_1
942
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 2]]
943
+  (0.0ms) SAVEPOINT active_record_1
944
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
945
+  (0.0ms) RELEASE SAVEPOINT active_record_1
946
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
947
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
948
+  (0.0ms) SAVEPOINT active_record_1
949
+ SQL (0.1ms) INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["cart_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["item_id", nil], ["quantity", 10], ["raw_item", "{\"id\":1,\"price\":10.0,\"title\":\"MyString\",\"created_at\":\"2012-02-01T14:49:34Z\",\"updated_at\":\"2012-02-01T14:49:34Z\"}"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
950
+ SQLite3::SQLException: table cart_items has no column named item_id: INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?)
951
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
952
+  (0.0ms) SAVEPOINT active_record_1
953
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
954
+  (0.0ms) RELEASE SAVEPOINT active_record_1
955
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
956
+  (0.0ms) SAVEPOINT active_record_1
957
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 20.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
958
+  (0.0ms) RELEASE SAVEPOINT active_record_1
959
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 2]]
960
+  (0.0ms) SAVEPOINT active_record_1
961
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
962
+  (0.0ms) RELEASE SAVEPOINT active_record_1
963
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
964
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
965
+  (0.0ms) SAVEPOINT active_record_1
966
+ SQL (0.1ms) INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["cart_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["item_id", nil], ["quantity", 10], ["raw_item", "{\"id\":1,\"price\":10.0,\"title\":\"MyString\",\"created_at\":\"2012-02-01T14:49:34Z\",\"updated_at\":\"2012-02-01T14:49:34Z\"}"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
967
+ SQLite3::SQLException: table cart_items has no column named item_id: INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?)
968
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
969
+  (0.0ms) SAVEPOINT active_record_1
970
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
971
+  (0.0ms) RELEASE SAVEPOINT active_record_1
972
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
973
+  (0.0ms) SAVEPOINT active_record_1
974
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 20.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
975
+  (0.0ms) RELEASE SAVEPOINT active_record_1
976
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 2]]
977
+  (0.0ms) SAVEPOINT active_record_1
978
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
979
+  (0.0ms) RELEASE SAVEPOINT active_record_1
980
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
981
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'incorrectcode' LIMIT 1
982
+  (0.0ms) SAVEPOINT active_record_1
983
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
984
+  (0.0ms) RELEASE SAVEPOINT active_record_1
985
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
986
+  (0.0ms) SAVEPOINT active_record_1
987
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 20.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
988
+  (1.3ms) RELEASE SAVEPOINT active_record_1
989
+ Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 2]]
990
+  (0.1ms) SAVEPOINT active_record_1
991
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
992
+  (0.1ms) RELEASE SAVEPOINT active_record_1
993
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
994
+  (0.0ms) SAVEPOINT active_record_1
995
+  (0.1ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'percent20off6.146289230694554' LIMIT 1
996
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "percent20off6.146289230694554"], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 0.8], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "20% Off!"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
997
+  (0.0ms) RELEASE SAVEPOINT active_record_1
998
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
999
+ ShopBunny::Coupon Load (0.2ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
1000
+  (0.0ms) SAVEPOINT active_record_1
1001
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'percent20off6.146289230694554' LIMIT 1
1002
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'percent20off6.146289230694554' LIMIT 1
1003
+ SQL (0.1ms) INSERT INTO "coupon_uses" ("cart_id", "coupon_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["cart_id", 1], ["coupon_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1004
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1005
+  (0.0ms) SAVEPOINT active_record_1
1006
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1007
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1008
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
1009
+  (0.0ms) SAVEPOINT active_record_1
1010
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 20.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1011
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1012
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 2]]
1013
+  (0.0ms) SAVEPOINT active_record_1
1014
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1015
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1016
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
1017
+  (0.0ms) SAVEPOINT active_record_1
1018
+  (0.0ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode6.504016858761199' LIMIT 1
1019
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode6.504016858761199"], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", 1], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
1020
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1021
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
1022
+  (0.0ms) SAVEPOINT active_record_1
1023
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'secretcode6.504016858761199' LIMIT 1
1024
+  (0.0ms) SELECT COUNT(*) FROM "coupon_uses" WHERE "coupon_uses"."coupon_id" = 1
1025
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'secretcode6.504016858761199' LIMIT 1
1026
+  (0.0ms) SELECT COUNT(*) FROM "coupon_uses" WHERE "coupon_uses"."coupon_id" = 1
1027
+ SQL (0.1ms) INSERT INTO "coupon_uses" ("cart_id", "coupon_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["cart_id", 1], ["coupon_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1028
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1029
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'secretcode6.504016858761199' LIMIT 1
1030
+  (0.0ms) SELECT COUNT(*) FROM "coupon_uses" WHERE "coupon_uses"."coupon_id" = 1
1031
+  (0.1ms) SELECT 1 FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1 AND "coupons"."id" = 1 LIMIT 1
1032
+  (0.0ms) SAVEPOINT active_record_1
1033
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1034
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1035
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
1036
+  (0.0ms) SAVEPOINT active_record_1
1037
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 20.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1038
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1039
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 2]]
1040
+  (0.0ms) SAVEPOINT active_record_1
1041
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1042
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1043
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
1044
+  (0.0ms) SAVEPOINT active_record_1
1045
+  (0.0ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode6.814097608184733' LIMIT 1
1046
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode6.814097608184733"], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
1047
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1048
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
1049
+  (0.1ms) SELECT COUNT(*) FROM "coupon_uses" WHERE "coupon_uses"."coupon_id" = 1
1050
+  (0.0ms) SAVEPOINT active_record_1
1051
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'secretcode6.814097608184733' LIMIT 1
1052
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'secretcode6.814097608184733' LIMIT 1
1053
+ SQL (0.1ms) INSERT INTO "coupon_uses" ("cart_id", "coupon_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["cart_id", 1], ["coupon_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1054
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1055
+  (0.1ms) SELECT COUNT(*) FROM "coupon_uses" WHERE "coupon_uses"."coupon_id" = 1
1056
+  (0.0ms) SAVEPOINT active_record_1
1057
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1058
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1059
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
1060
+  (0.0ms) SAVEPOINT active_record_1
1061
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 20.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1062
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1063
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 2]]
1064
+  (0.0ms) SAVEPOINT active_record_1
1065
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1066
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1067
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
1068
+  (0.0ms) SAVEPOINT active_record_1
1069
+  (0.0ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'percent20off7.723770888383858' LIMIT 1
1070
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "percent20off7.723770888383858"], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 0.8], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "20% Off!"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
1071
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1072
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
1073
+ ShopBunny::Coupon Load (0.1ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
1074
+  (0.0ms) SAVEPOINT active_record_1
1075
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'percent20off7.723770888383858' LIMIT 1
1076
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'percent20off7.723770888383858' LIMIT 1
1077
+ SQL (0.1ms) INSERT INTO "coupon_uses" ("cart_id", "coupon_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["cart_id", 1], ["coupon_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1078
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1079
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
1080
+ ShopBunny::Coupon Load (0.1ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
1081
+  (0.0ms) SAVEPOINT active_record_1
1082
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = '' LIMIT 1
1083
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1084
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
1085
+  (0.1ms) SELECT COUNT(DISTINCT "coupons"."id") FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
1086
+  (0.0ms) SAVEPOINT active_record_1
1087
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'percent20off7.723770888383858' LIMIT 1
1088
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'percent20off7.723770888383858' LIMIT 1
1089
+ SQL (0.1ms) INSERT INTO "coupon_uses" ("cart_id", "coupon_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["cart_id", 1], ["coupon_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1090
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1091
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
1092
+  (0.1ms) SELECT COUNT(DISTINCT "coupons"."id") FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
1093
+  (0.0ms) SAVEPOINT active_record_1
1094
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1095
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1096
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
1097
+  (0.0ms) SAVEPOINT active_record_1
1098
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 20.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1099
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1100
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 2]]
1101
+  (0.0ms) SAVEPOINT active_record_1
1102
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1103
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1104
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
1105
+  (0.0ms) SAVEPOINT active_record_1
1106
+  (0.1ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'percent20off8.339758444630187' LIMIT 1
1107
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "percent20off8.339758444630187"], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 0.8], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "20% Off!"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
1108
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1109
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
1110
+  (0.0ms) SAVEPOINT active_record_1
1111
+  (0.1ms) SELECT 1 FROM "coupons" WHERE ("coupons"."code" = 'percent20off8.339758444630187' AND "coupons"."id" != 1) LIMIT 1
1112
+  (0.1ms) UPDATE "coupons" SET "max_uses" = -1, "updated_at" = '2012-02-01 14:49:34.820064' WHERE "coupons"."id" = 1
1113
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1114
+ ShopBunny::Coupon Load (0.1ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
1115
+  (0.0ms) SAVEPOINT active_record_1
1116
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'percent20off8.339758444630187' LIMIT 1
1117
+  (0.0ms) SELECT COUNT(*) FROM "coupon_uses" WHERE "coupon_uses"."coupon_id" = 1
1118
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1119
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
1120
+  (0.1ms) SELECT COUNT(DISTINCT "coupons"."id") FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
1121
+  (0.0ms) SAVEPOINT active_record_1
1122
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1123
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1124
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
1125
+  (0.0ms) SAVEPOINT active_record_1
1126
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 20.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1127
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1128
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 2]]
1129
+  (0.0ms) SAVEPOINT active_record_1
1130
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1131
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1132
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
1133
+  (0.0ms) SAVEPOINT active_record_1
1134
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 15.99], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1135
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1136
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 3]]
1137
+  (0.0ms) SAVEPOINT active_record_1
1138
+  (0.0ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode8.421791277925287' LIMIT 1
1139
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", 3], ["code", "secretcode8.421791277925287"], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
1140
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1141
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
1142
+  (0.0ms) SAVEPOINT active_record_1
1143
+  (0.0ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode8.58052439832345' LIMIT 1
1144
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode8.58052439832345"], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
1145
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1146
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 2]]
1147
+  (0.0ms) SAVEPOINT active_record_1
1148
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'secretcode8.421791277925287' LIMIT 1
1149
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'secretcode8.421791277925287' LIMIT 1
1150
+ SQL (0.1ms) INSERT INTO "coupon_uses" ("cart_id", "coupon_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["cart_id", 1], ["coupon_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1151
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1152
+  (0.0ms) SAVEPOINT active_record_1
1153
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'secretcode8.58052439832345' LIMIT 1
1154
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'secretcode8.58052439832345' LIMIT 1
1155
+ SQL (0.1ms) INSERT INTO "coupon_uses" ("cart_id", "coupon_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["cart_id", 1], ["coupon_id", 2], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1156
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1157
+ ShopBunny::Coupon Load (0.1ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
1158
+ Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = 3 LIMIT 1
1159
+  (0.0ms) SAVEPOINT active_record_1
1160
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1161
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1162
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
1163
+  (0.0ms) SAVEPOINT active_record_1
1164
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 20.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1165
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1166
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 2]]
1167
+  (0.0ms) SAVEPOINT active_record_1
1168
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1169
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1170
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
1171
+  (0.0ms) SAVEPOINT active_record_1
1172
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 15.99], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1173
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1174
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 3]]
1175
+  (0.0ms) SAVEPOINT active_record_1
1176
+  (0.1ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode8.699483346033665' LIMIT 1
1177
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", 3], ["code", "secretcode8.699483346033665"], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
1178
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1179
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
1180
+  (0.0ms) SAVEPOINT active_record_1
1181
+  (0.0ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode8.830691991525473' LIMIT 1
1182
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode8.830691991525473"], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
1183
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1184
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 2]]
1185
+  (0.0ms) SAVEPOINT active_record_1
1186
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'secretcode8.699483346033665' LIMIT 1
1187
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'secretcode8.699483346033665' LIMIT 1
1188
+ SQL (0.1ms) INSERT INTO "coupon_uses" ("cart_id", "coupon_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["cart_id", 1], ["coupon_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1189
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1190
+  (0.0ms) SAVEPOINT active_record_1
1191
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'secretcode8.830691991525473' LIMIT 1
1192
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'secretcode8.830691991525473' LIMIT 1
1193
+ SQL (0.1ms) INSERT INTO "coupon_uses" ("cart_id", "coupon_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["cart_id", 1], ["coupon_id", 2], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1194
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1195
+  (0.1ms) SELECT COUNT(DISTINCT "coupons"."id") FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
1196
+ ShopBunny::Coupon Load (0.1ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
1197
+ Item Load (0.1ms) SELECT "items".* FROM "items" WHERE "items"."id" = 3 LIMIT 1
1198
+  (0.0ms) SAVEPOINT active_record_1
1199
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1200
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1201
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
1202
+  (0.0ms) SAVEPOINT active_record_1
1203
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 20.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1204
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1205
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 2]]
1206
+  (0.0ms) SAVEPOINT active_record_1
1207
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1208
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1209
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
1210
+  (0.0ms) SAVEPOINT active_record_1
1211
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 30.3], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1212
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1213
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 3]]
1214
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
1215
+  (0.0ms) SAVEPOINT active_record_1
1216
+ SQL (0.1ms) INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["cart_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["item_id", nil], ["quantity", 10], ["raw_item", "{\"id\":1,\"price\":10.0,\"title\":\"MyString\",\"created_at\":\"2012-02-01T14:49:34Z\",\"updated_at\":\"2012-02-01T14:49:34Z\"}"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1217
+ SQLite3::SQLException: table cart_items has no column named item_id: INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?)
1218
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1219
+  (0.0ms) SAVEPOINT active_record_1
1220
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1221
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1222
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
1223
+  (0.0ms) SAVEPOINT active_record_1
1224
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 20.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1225
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1226
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 2]]
1227
+  (0.0ms) SAVEPOINT active_record_1
1228
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1229
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1230
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
1231
+  (0.0ms) SAVEPOINT active_record_1
1232
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 30.3], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1233
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1234
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 3]]
1235
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
1236
+  (0.0ms) SAVEPOINT active_record_1
1237
+ SQL (0.1ms) INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["cart_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["item_id", nil], ["quantity", 10], ["raw_item", "{\"id\":1,\"price\":10.0,\"title\":\"MyString\",\"created_at\":\"2012-02-01T14:49:34Z\",\"updated_at\":\"2012-02-01T14:49:34Z\"}"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1238
+ SQLite3::SQLException: table cart_items has no column named item_id: INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?)
1239
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1240
+  (0.0ms) SAVEPOINT active_record_1
1241
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1242
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1243
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
1244
+  (0.0ms) SAVEPOINT active_record_1
1245
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 20.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1246
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1247
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 2]]
1248
+  (0.0ms) SAVEPOINT active_record_1
1249
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1250
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1251
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
1252
+  (0.0ms) SAVEPOINT active_record_1
1253
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 30.3], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1254
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1255
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 3]]
1256
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
1257
+  (0.0ms) SAVEPOINT active_record_1
1258
+ SQL (0.1ms) INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["cart_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["item_id", nil], ["quantity", 10], ["raw_item", "{\"id\":1,\"price\":10.0,\"title\":\"MyString\",\"created_at\":\"2012-02-01T14:49:34Z\",\"updated_at\":\"2012-02-01T14:49:34Z\"}"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1259
+ SQLite3::SQLException: table cart_items has no column named item_id: INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?)
1260
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1261
+  (0.0ms) SAVEPOINT active_record_1
1262
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1263
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1264
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
1265
+  (0.0ms) SAVEPOINT active_record_1
1266
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 20.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1267
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1268
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 2]]
1269
+  (0.0ms) SAVEPOINT active_record_1
1270
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1271
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1272
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
1273
+  (0.0ms) SAVEPOINT active_record_1
1274
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 30.3], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1275
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1276
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 3]]
1277
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
1278
+  (0.0ms) SAVEPOINT active_record_1
1279
+ SQL (0.1ms) INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["cart_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["item_id", nil], ["quantity", 10], ["raw_item", "{\"id\":1,\"price\":10.0,\"title\":\"MyString\",\"created_at\":\"2012-02-01T14:49:34Z\",\"updated_at\":\"2012-02-01T14:49:34Z\"}"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1280
+ SQLite3::SQLException: table cart_items has no column named item_id: INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?)
1281
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1282
+  (0.0ms) SAVEPOINT active_record_1
1283
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1284
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1285
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
1286
+  (0.0ms) SAVEPOINT active_record_1
1287
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 20.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1288
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1289
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 2]]
1290
+  (0.0ms) SAVEPOINT active_record_1
1291
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1292
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1293
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
1294
+  (0.0ms) SAVEPOINT active_record_1
1295
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 30.3], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1296
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1297
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 3]]
1298
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
1299
+  (0.0ms) SAVEPOINT active_record_1
1300
+ SQL (0.1ms) INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["cart_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["item_id", nil], ["quantity", 10], ["raw_item", "{\"id\":1,\"price\":10.0,\"title\":\"MyString\",\"created_at\":\"2012-02-01T14:49:34Z\",\"updated_at\":\"2012-02-01T14:49:34Z\"}"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1301
+ SQLite3::SQLException: table cart_items has no column named item_id: INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?)
1302
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1303
+  (0.0ms) SAVEPOINT active_record_1
1304
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1305
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1306
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
1307
+  (0.0ms) SAVEPOINT active_record_1
1308
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 20.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1309
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1310
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 2]]
1311
+  (0.0ms) SAVEPOINT active_record_1
1312
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1313
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1314
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
1315
+  (0.0ms) SAVEPOINT active_record_1
1316
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 30.3], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1317
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1318
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 3]]
1319
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
1320
+  (0.0ms) SAVEPOINT active_record_1
1321
+ SQL (0.1ms) INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["cart_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["item_id", nil], ["quantity", 10], ["raw_item", "{\"id\":1,\"price\":10.0,\"title\":\"MyString\",\"created_at\":\"2012-02-01T14:49:34Z\",\"updated_at\":\"2012-02-01T14:49:34Z\"}"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1322
+ SQLite3::SQLException: table cart_items has no column named item_id: INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?)
1323
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1324
+  (0.0ms) SAVEPOINT active_record_1
1325
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1326
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1327
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
1328
+  (0.0ms) SAVEPOINT active_record_1
1329
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 20.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1330
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1331
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 2]]
1332
+  (0.0ms) SAVEPOINT active_record_1
1333
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1334
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1335
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
1336
+  (0.0ms) SAVEPOINT active_record_1
1337
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 50.01], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1338
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1339
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 3]]
1340
+  (0.0ms) SAVEPOINT active_record_1
1341
+  (0.0ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode8.904209112650431' LIMIT 1
1342
+ SQL (0.5ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode8.904209112650431"], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
1343
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1344
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
1345
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
1346
+  (0.0ms) SAVEPOINT active_record_1
1347
+ SQL (0.1ms) INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["cart_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["item_id", nil], ["quantity", 1], ["raw_item", "{\"id\":3,\"price\":50.01,\"title\":\"MyString\",\"created_at\":\"2012-02-01T14:49:34Z\",\"updated_at\":\"2012-02-01T14:49:34Z\"}"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1348
+ SQLite3::SQLException: table cart_items has no column named item_id: INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?)
1349
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1350
+  (0.0ms) SAVEPOINT active_record_1
1351
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1352
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1353
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
1354
+  (0.0ms) SAVEPOINT active_record_1
1355
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 20.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1356
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1357
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 2]]
1358
+  (0.0ms) SAVEPOINT active_record_1
1359
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1360
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1361
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
1362
+  (0.0ms) SAVEPOINT active_record_1
1363
+  (0.0ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode9.66758120187541' LIMIT 1
1364
+ SQL (0.3ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode9.66758120187541"], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", 10.0]]
1365
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1366
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
1367
+  (0.0ms) SAVEPOINT active_record_1
1368
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1369
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1370
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 3]]
1371
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
1372
+  (0.0ms) SAVEPOINT active_record_1
1373
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1374
+ ShopBunny::Coupon Load (0.1ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
1375
+  (0.0ms) SAVEPOINT active_record_1
1376
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1377
+  (0.0ms) SAVEPOINT active_record_1
1378
+ SQL (0.1ms) INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["cart_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["item_id", nil], ["quantity", 1], ["raw_item", "{\"id\":3,\"price\":10.0,\"title\":\"MyString\",\"created_at\":\"2012-02-01T14:49:34Z\",\"updated_at\":\"2012-02-01T14:49:34Z\"}"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1379
+ SQLite3::SQLException: table cart_items has no column named item_id: INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?)
1380
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1381
+  (0.0ms) SAVEPOINT active_record_1
1382
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1383
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1384
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
1385
+  (0.0ms) SAVEPOINT active_record_1
1386
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 20.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1387
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1388
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 2]]
1389
+  (0.0ms) SAVEPOINT active_record_1
1390
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1391
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1392
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
1393
+  (0.0ms) SAVEPOINT active_record_1
1394
+  (0.0ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode10.530515526508012' LIMIT 1
1395
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode10.530515526508012"], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", 10.0]]
1396
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1397
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
1398
+  (0.0ms) SAVEPOINT active_record_1
1399
+  (0.0ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode11.448678762717714' LIMIT 1
1400
+ SQL (0.3ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode11.448678762717714"], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", 15.0]]
1401
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1402
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 2]]
1403
+  (0.0ms) SAVEPOINT active_record_1
1404
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 12.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1405
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1406
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 3]]
1407
+  (0.0ms) SAVEPOINT active_record_1
1408
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 3.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1409
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1410
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 4]]
1411
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
1412
+  (0.0ms) SAVEPOINT active_record_1
1413
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1414
+ ShopBunny::Coupon Load (0.1ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
1415
+  (0.0ms) SAVEPOINT active_record_1
1416
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1417
+  (0.0ms) SAVEPOINT active_record_1
1418
+ SQL (0.1ms) INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["cart_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["item_id", nil], ["quantity", 1], ["raw_item", "{\"id\":3,\"price\":12.0,\"title\":\"MyString\",\"created_at\":\"2012-02-01T14:49:34Z\",\"updated_at\":\"2012-02-01T14:49:34Z\"}"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1419
+ SQLite3::SQLException: table cart_items has no column named item_id: INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?)
1420
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1421
+  (0.0ms) SAVEPOINT active_record_1
1422
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1423
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1424
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
1425
+  (0.0ms) SAVEPOINT active_record_1
1426
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 20.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1427
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1428
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 2]]
1429
+  (0.0ms) SAVEPOINT active_record_1
1430
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1431
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1432
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
1433
+  (0.0ms) SAVEPOINT active_record_1
1434
+  (0.0ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode12.046219942660871' LIMIT 1
1435
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode12.046219942660871"], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", 10.0]]
1436
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1437
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
1438
+  (1.6ms) SAVEPOINT active_record_1
1439
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 5.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1440
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1441
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 3]]
1442
+  (0.0ms) SAVEPOINT active_record_1
1443
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 6.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1444
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1445
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 4]]
1446
+  (0.0ms) SAVEPOINT active_record_1
1447
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 7.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1448
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1449
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 5]]
1450
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
1451
+  (0.0ms) SAVEPOINT active_record_1
1452
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1453
+ ShopBunny::Coupon Load (0.1ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
1454
+  (0.0ms) SAVEPOINT active_record_1
1455
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1456
+  (0.0ms) SAVEPOINT active_record_1
1457
+ SQL (0.1ms) INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["cart_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["item_id", nil], ["quantity", 1], ["raw_item", "{\"id\":3,\"price\":5.0,\"title\":\"MyString\",\"created_at\":\"2012-02-01T14:49:34Z\",\"updated_at\":\"2012-02-01T14:49:34Z\"}"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1458
+ SQLite3::SQLException: table cart_items has no column named item_id: INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?)
1459
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1460
+  (0.0ms) SAVEPOINT active_record_1
1461
+ SQL (0.2ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 10.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1462
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1463
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 1]]
1464
+  (0.0ms) SAVEPOINT active_record_1
1465
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 20.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1466
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1467
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 2]]
1468
+  (0.0ms) SAVEPOINT active_record_1
1469
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1470
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1471
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
1472
+  (0.0ms) SAVEPOINT active_record_1
1473
+  (0.0ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode12.447160427131356' LIMIT 1
1474
+ SQL (0.3ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode12.447160427131356"], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", 10.0]]
1475
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1476
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
1477
+  (0.0ms) SAVEPOINT active_record_1
1478
+ SQL (0.1ms) INSERT INTO "items" ("created_at", "price", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["price", 5.0], ["title", "MyString"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1479
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1480
+ Item Load (0.0ms) SELECT "items".* FROM "items" WHERE "items"."id" = ? LIMIT 1 [["id", 3]]
1481
+ ShopBunny::CartItem Load (0.1ms) SELECT "cart_items".* FROM "cart_items" WHERE "cart_items"."cart_id" = 1
1482
+  (0.0ms) SAVEPOINT active_record_1
1483
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1484
+ ShopBunny::Coupon Load (0.1ms) SELECT DISTINCT "coupons".* FROM "coupons" INNER JOIN "coupon_uses" ON "coupons"."id" = "coupon_uses"."coupon_id" WHERE "coupon_uses"."cart_id" = 1
1485
+  (0.0ms) SAVEPOINT active_record_1
1486
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1487
+  (0.0ms) SAVEPOINT active_record_1
1488
+ SQL (0.1ms) INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["cart_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["item_id", nil], ["quantity", 1], ["raw_item", "{\"id\":3,\"price\":5.0,\"title\":\"MyString\",\"created_at\":\"2012-02-01T14:49:34Z\",\"updated_at\":\"2012-02-01T14:49:34Z\"}"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00]]
1489
+ SQLite3::SQLException: table cart_items has no column named item_id: INSERT INTO "cart_items" ("cart_id", "created_at", "item_id", "quantity", "raw_item", "updated_at") VALUES (?, ?, ?, ?, ?, ?)
1490
+  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1
1491
+  (0.0ms) SAVEPOINT active_record_1
1492
+  (0.1ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode12.452128684562233' LIMIT 1
1493
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode12.452128684562233"], ["created_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:34 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
1494
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1495
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
1496
+  (0.0ms) SELECT 1 FROM "coupons" WHERE ("coupons"."code" = 'secretcode12.452128684562233' AND "coupons"."id" != 1) LIMIT 1
1497
+  (0.0ms) SAVEPOINT active_record_1
1498
+  (0.1ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode12.759091971159073' LIMIT 1
1499
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode12.759091971159073"], ["created_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
1500
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1501
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
1502
+  (0.1ms) SELECT 1 FROM "coupons" WHERE ("coupons"."code" = '' AND "coupons"."id" != 1) LIMIT 1
1503
+  (0.0ms) SAVEPOINT active_record_1
1504
+  (0.1ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode13.528540521310877' LIMIT 1
1505
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode13.528540521310877"], ["created_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
1506
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1507
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
1508
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" LIMIT 1
1509
+  (0.0ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode13.528540521310877' LIMIT 1
1510
+  (0.0ms) SAVEPOINT active_record_1
1511
+  (0.1ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode13.952897071213021' LIMIT 1
1512
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode13.952897071213021"], ["created_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
1513
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1514
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
1515
+  (0.0ms) SAVEPOINT active_record_1
1516
+  (0.1ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'daterange14.904800021441897' LIMIT 1
1517
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "daterange14.904800021441897"], ["created_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "Datumscoupon"], ["updated_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["valid_from", Thu, 09 Sep 2010 22:00:00 UTC +00:00], ["valid_until", Sun, 19 Sep 2010 22:00:00 UTC +00:00], ["value_of_automatic_add", nil]]
1518
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1519
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
1520
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
1521
+  (0.0ms) SAVEPOINT active_record_1
1522
+  (0.1ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode15.754161964745553' LIMIT 1
1523
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode15.754161964745553"], ["created_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "redeemed"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
1524
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1525
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
1526
+  (0.0ms) SAVEPOINT active_record_1
1527
+  (0.0ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode15.996191914278452' LIMIT 1
1528
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode15.996191914278452"], ["created_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "inactive"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
1529
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1530
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 2]]
1531
+  (0.0ms) SAVEPOINT active_record_1
1532
+  (0.1ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode16.913975175157308' LIMIT 1
1533
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode16.913975175157308"], ["created_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "inactive"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
1534
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1535
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
1536
+  (0.0ms) SAVEPOINT active_record_1
1537
+  (0.0ms) SELECT 1 FROM "coupons" WHERE ("coupons"."code" = 'secretcode16.913975175157308' AND "coupons"."id" != 1) LIMIT 1
1538
+  (0.1ms) UPDATE "coupons" SET "state" = 'active', "updated_at" = '2012-02-01 14:49:35.023265' WHERE "coupons"."id" = 1
1539
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1540
+  (0.0ms) SAVEPOINT active_record_1
1541
+  (0.1ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode17.35134321753946' LIMIT 1
1542
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode17.35134321753946"], ["created_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
1543
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1544
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
1545
+  (0.0ms) SAVEPOINT active_record_1
1546
+  (0.0ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode17.58342270763763' LIMIT 1
1547
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode17.58342270763763"], ["created_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "redeemed"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
1548
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1549
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 2]]
1550
+  (0.0ms) SAVEPOINT active_record_1
1551
+  (0.1ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode17.65517066865955' LIMIT 1
1552
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode17.65517066865955"], ["created_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
1553
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1554
+  (0.0ms) SAVEPOINT active_record_1
1555
+  (0.1ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode18.34236808560654' LIMIT 1
1556
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode18.34236808560654"], ["created_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
1557
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1558
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
1559
+  (0.0ms) SAVEPOINT active_record_1
1560
+  (0.0ms) SELECT 1 FROM "coupons" WHERE ("coupons"."code" = 'secretcode18.34236808560654' AND "coupons"."id" != 1) LIMIT 1
1561
+  (0.1ms) UPDATE "coupons" SET "state" = 'redeemed', "updated_at" = '2012-02-01 14:49:35.035004' WHERE "coupons"."id" = 1
1562
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1563
+  (0.0ms) SAVEPOINT active_record_1
1564
+  (0.1ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode18.626668202142422' LIMIT 1
1565
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode18.626668202142422"], ["created_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "inactive"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
1566
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1567
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
1568
+  (0.0ms) SAVEPOINT active_record_1
1569
+  (0.0ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode18.671242507767445' LIMIT 1
1570
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode18.671242507767445"], ["created_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "redeemed"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
1571
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1572
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 2]]
1573
+  (0.0ms) SAVEPOINT active_record_1
1574
+  (0.1ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode19.143154555207136' LIMIT 1
1575
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode19.143154555207136"], ["created_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
1576
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1577
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
1578
+  (0.0ms) SAVEPOINT active_record_1
1579
+  (0.1ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode19.765102203677316' LIMIT 1
1580
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode19.765102203677316"], ["created_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "redeemed"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
1581
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1582
+  (0.0ms) SAVEPOINT active_record_1
1583
+  (0.1ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode20.29022043824079' LIMIT 1
1584
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode20.29022043824079"], ["created_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "inactive"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
1585
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1586
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
1587
+  (0.0ms) SAVEPOINT active_record_1
1588
+  (0.0ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode20.32823627765754' LIMIT 1
1589
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode20.32823627765754"], ["created_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
1590
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1591
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 2]]
1592
+  (0.0ms) SAVEPOINT active_record_1
1593
+  (0.0ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode20.718957171304226' LIMIT 1
1594
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode20.718957171304226"], ["created_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "redeemed"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
1595
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1596
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 3]]
1597
+  (0.0ms) SAVEPOINT active_record_1
1598
+  (0.1ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode21.094254530990007' LIMIT 1
1599
+ SQL (0.4ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode21.094254530990007"], ["created_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", nil], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
1600
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1601
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
1602
+  (0.0ms) SAVEPOINT active_record_1
1603
+  (0.1ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode21.774097682512785' LIMIT 1
1604
+ SQL (0.5ms) INSERT INTO "coupons" ("bonus_article_id", "code", "created_at", "discount_credit", "discount_percentage", "max_uses", "removes_shipping_cost", "removes_tax", "state", "title", "updated_at", "valid_from", "valid_until", "value_of_automatic_add") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["bonus_article_id", nil], ["code", "secretcode21.774097682512785"], ["created_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["discount_credit", 0.0], ["discount_percentage", 1.0], ["max_uses", 1], ["removes_shipping_cost", false], ["removes_tax", false], ["state", "active"], ["title", "default"], ["updated_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["valid_from", nil], ["valid_until", nil], ["value_of_automatic_add", nil]]
1605
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1606
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
1607
+  (0.1ms) SELECT COUNT(*) FROM "coupon_uses" WHERE "coupon_uses"."coupon_id" = 1
1608
+  (0.0ms) SAVEPOINT active_record_1
1609
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'secretcode21.774097682512785' LIMIT 1
1610
+  (0.0ms) SELECT COUNT(*) FROM "coupon_uses" WHERE "coupon_uses"."coupon_id" = 1
1611
+ ShopBunny::Coupon Load (0.1ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."code" = 'secretcode21.774097682512785' LIMIT 1
1612
+  (0.0ms) SELECT COUNT(*) FROM "coupon_uses" WHERE "coupon_uses"."coupon_id" = 1
1613
+ SQL (0.2ms) INSERT INTO "carts" ("created_at", "type", "updated_at") VALUES (?, ?, ?) [["created_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["type", nil], ["updated_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00]]
1614
+ SQL (0.1ms) INSERT INTO "coupon_uses" ("cart_id", "coupon_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["cart_id", 1], ["coupon_id", 1], ["created_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00], ["updated_at", Wed, 01 Feb 2012 14:49:35 UTC +00:00]]
1615
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1616
+ Cart Load (0.0ms) SELECT "carts".* FROM "carts" WHERE "carts"."id" = ? LIMIT 1 [["id", 1]]
1617
+ ShopBunny::Coupon Load (0.0ms) SELECT "coupons".* FROM "coupons" WHERE "coupons"."id" = ? LIMIT 1 [["id", 1]]
1618
+  (0.0ms) SELECT COUNT(*) FROM "coupon_uses" WHERE "coupon_uses"."coupon_id" = 1
1619
+  (0.0ms) SAVEPOINT active_record_1
1620
+  (0.1ms) SELECT 1 FROM "coupons" WHERE "coupons"."code" = 'secretcode22.10482952177554' LIMIT 1
1621