Skip to content

Instantly share code, notes, and snippets.

@asecondwill
Created August 24, 2014 00:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asecondwill/14bb1378b28542da406c to your computer and use it in GitHub Desktop.
Save asecondwill/14bb1378b28542da406c to your computer and use it in GitHub Desktop.
log showing hasmany through not creating records
Started POST "/helm/coupons" for 127.0.0.1 at 2014-08-24 09:58:25 +1000
Processing by Helm::CouponsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"h8OjO3zqPVofhgQ8VYECea4kCCnXU+Lkn7L2QPJUDcM=", "coupon"=>{"name"=>"test", "code"=>"test", "dollar_discount"=>"5", "percent_discount"=>"", "max_uses"=>"1000000", "max_uses_per_customer"=>"1000000", "starts_at(1i)"=>"2014", "starts_at(2i)"=>"8", "starts_at(3i)"=>"24", "starts_at(4i)"=>"09", "starts_at(5i)"=>"00", "expires_at(1i)"=>"2017", "expires_at(2i)"=>"8", "expires_at(3i)"=>"24", "expires_at(4i)"=>"09", "expires_at(5i)"=>"00", "activity_ids"=>["", "2", "3", "4"]}, "commit"=>"Saving..."}
User Load (0.7ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 ORDER BY "users"."id" ASC LIMIT 1
Provider Load (0.4ms) SELECT "providers".* FROM "providers" WHERE "providers"."id" = $1 LIMIT 1 [["id", 1]]
Provider Load (0.5ms) SELECT "providers".* FROM "providers" WHERE "providers"."id" = $1 LIMIT 1 [["id", 1]]
(0.3ms) BEGIN
Coupon Exists (0.5ms) SELECT 1 AS one FROM "coupons" WHERE "coupons"."code" = 'test' LIMIT 1
SQL (34.0ms) INSERT INTO "coupons" ("code", "dollar_discount", "expires_at", "max_uses", "max_uses_per_customer", "name", "percent_discount", "provider_id", "starts_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["code", "test"], ["dollar_discount", 5.0], ["expires_at", "2017-08-23 23:00:00.000000"], ["max_uses", 1000000], ["max_uses_per_customer", 1000000], ["name", "test"], ["percent_discount", ""], ["provider_id", 1], ["starts_at", "2014-08-23 23:00:00.000000"]]
(0.6ms) COMMIT
(0.3ms) BEGIN
(0.3ms) COMMIT
(0.3ms) BEGIN
Coupon Exists (0.9ms) SELECT 1 AS one FROM "coupons" WHERE ("coupons"."code" = 'test' AND "coupons"."id" != 1) LIMIT 1
(0.3ms) COMMIT
Redirected to http://localhost:3000/helm/coupons
Completed 302 Found in 117ms (ActiveRecord: 39.1ms)
cache: [POST /helm/coupons] invalidate, pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment