dirty_associations 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.rdoc +19 -13
- data/lib/dirty_associations/version.rb +1 -1
- data/test/dummy/log/test.log +181 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 690ddc95616a5296f9b9ed9023b00b832202b01c
|
4
|
+
data.tar.gz: ad1f6408aa5f8e310f596fa22406f9eb53adec18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7c345354039b42bb39f332364648cec8ef8688b9fa5953da31ef8ec0e060751ce75bf19507b2ecd0d47f5ced72e4a707caf69f82c922c121a4f3a549057de3b
|
7
|
+
data.tar.gz: 9d3058591a35734e2a7dc02198393a4a89722a5a0cb798ff15b69feb0c75757fcf6fef009328951ee8122fd46565168597af64e8ce0357752de1d253331ad9f9
|
data/README.rdoc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
= DirtyAssociations
|
2
2
|
|
3
|
-
Monitors changes to <tt>has_many</tt> associations using ActiveModel::Dirty.
|
3
|
+
Monitors changes to <tt>has_many</tt> and <tt>has_and_belongs_to_many</tt> associations using ActiveModel::Dirty.
|
4
4
|
|
5
5
|
== Usage
|
6
6
|
|
@@ -13,15 +13,21 @@ Call <tt>monitor_association_changes</tt> method after <tt>has_many</tt>.
|
|
13
13
|
has_many :foos
|
14
14
|
monitor_association_changes :foos
|
15
15
|
|
16
|
-
Check
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
16
|
+
Check one of the following methods to see if the relation has changed:
|
17
|
+
- <tt>changes</tt>
|
18
|
+
- <tt>changed</tt>
|
19
|
+
- <tt>previous_changes</tt>
|
20
|
+
- <tt>[singularized_association_name]_ids_changed?</tt>
|
21
|
+
- <tt>[singularized_association_name]_ids_previously_changed?</tt>
|
22
|
+
|
23
|
+
|
24
|
+
bar.foos = [ Foo.find(42) ] # or you can use the foo_ids setter
|
25
|
+
bar.changes # { "foo_ids" => [[5], [42]] }
|
26
|
+
bar.changed # [ "foo_ids" ]
|
27
|
+
bar.foo_ids_changed? # true
|
28
|
+
bar.foo_ids_previously_changed? # false
|
29
|
+
|
30
|
+
bar.save
|
31
|
+
bar.previous_changes # { "foo_ids" => [[5], [42]] }
|
32
|
+
bar.foo_ids_changed? # false
|
33
|
+
bar.foo_ids_previously_changed? # true
|
data/test/dummy/log/test.log
CHANGED
@@ -2484,3 +2484,184 @@ DirtyAssociationsTest: test_setting_has_many_association_ids_adds_association_to
|
|
2484
2484
|
[1m[36mSQL (0.1ms)[0m [1mUPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1[0m [["bar_id", 1], ["updated_at", Wed, 13 Nov 2013 04:43:39 UTC +00:00]]
|
2485
2485
|
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2486
2486
|
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
2487
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
2488
|
+
-------------------------------------------------
|
2489
|
+
DirtyAssociationsTest: test_changes_reset_by_save
|
2490
|
+
-------------------------------------------------
|
2491
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2492
|
+
[1m[36mSQL (5.0ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Wed, 13 Nov 2013 13:04:26 UTC +00:00], ["updated_at", Wed, 13 Nov 2013 13:04:26 UTC +00:00]]
|
2493
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
2494
|
+
[1m[36mFoo Load (0.1ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1[0m [["id", 1]]
|
2495
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
2496
|
+
[1m[36mSQL (1.2ms)[0m [1mINSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Wed, 13 Nov 2013 13:04:26 UTC +00:00], ["updated_at", Wed, 13 Nov 2013 13:04:26 UTC +00:00]]
|
2497
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar_id", 1], ["updated_at", Wed, 13 Nov 2013 13:04:26 UTC +00:00]]
|
2498
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2499
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2500
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2501
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2502
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Wed, 13 Nov 2013 13:04:26 UTC +00:00], ["updated_at", Wed, 13 Nov 2013 13:04:26 UTC +00:00]]
|
2503
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2504
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2505
|
+
[1m[35mSQL (0.2ms)[0m UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = ? AND "foos"."id" IN (1) [["bar_id", 1]]
|
2506
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2[0m [["bar_id", 1], ["updated_at", Wed, 13 Nov 2013 13:04:26 UTC +00:00]]
|
2507
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2508
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
2509
|
+
[1m[35m (0.1ms)[0m begin transaction
|
2510
|
+
---------------------------------------------------------------------------------------
|
2511
|
+
DirtyAssociationsTest: test_has_many_association_appears_in_previous_changes_after_save
|
2512
|
+
---------------------------------------------------------------------------------------
|
2513
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2514
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Wed, 13 Nov 2013 13:04:26 UTC +00:00], ["updated_at", Wed, 13 Nov 2013 13:04:26 UTC +00:00]]
|
2515
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2516
|
+
[1m[35mFoo Load (0.0ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]]
|
2517
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2518
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Wed, 13 Nov 2013 13:04:26 UTC +00:00], ["updated_at", Wed, 13 Nov 2013 13:04:26 UTC +00:00]]
|
2519
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 1[0m [["bar_id", 1], ["updated_at", Wed, 13 Nov 2013 13:04:26 UTC +00:00]]
|
2520
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2521
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2522
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2523
|
+
[1m[36m (0.3ms)[0m [1mrollback transaction[0m
|
2524
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2525
|
+
-------------------------------------------------------------------------------
|
2526
|
+
DirtyAssociationsTest: test_setting_has_many_association_adds_object_to_changes
|
2527
|
+
-------------------------------------------------------------------------------
|
2528
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2529
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Wed, 13 Nov 2013 13:04:26 UTC +00:00], ["updated_at", Wed, 13 Nov 2013 13:04:26 UTC +00:00]]
|
2530
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2531
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2532
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Wed, 13 Nov 2013 13:04:26 UTC +00:00], ["updated_at", Wed, 13 Nov 2013 13:04:26 UTC +00:00]]
|
2533
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2534
|
+
[1m[36mFoo Load (0.0ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1[0m [["id", 2]]
|
2535
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2536
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Wed, 13 Nov 2013 13:04:26 UTC +00:00], ["updated_at", Wed, 13 Nov 2013 13:04:26 UTC +00:00]]
|
2537
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2 [["bar_id", 1], ["updated_at", Wed, 13 Nov 2013 13:04:26 UTC +00:00]]
|
2538
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2539
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2540
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2541
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
2542
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2543
|
+
----------------------------------------------------------------------------------------
|
2544
|
+
DirtyAssociationsTest: test_setting_has_many_association_ids_adds_association_to_changes
|
2545
|
+
----------------------------------------------------------------------------------------
|
2546
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2547
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Wed, 13 Nov 2013 13:04:26 UTC +00:00], ["updated_at", Wed, 13 Nov 2013 13:04:26 UTC +00:00]]
|
2548
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2549
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2550
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "foos" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Wed, 13 Nov 2013 13:04:26 UTC +00:00], ["updated_at", Wed, 13 Nov 2013 13:04:26 UTC +00:00]]
|
2551
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2552
|
+
[1m[35mFoo Load (0.0ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]]
|
2553
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2554
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Wed, 13 Nov 2013 13:04:26 UTC +00:00], ["updated_at", Wed, 13 Nov 2013 13:04:26 UTC +00:00]]
|
2555
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "foos" SET "bar_id" = ?, "updated_at" = ? WHERE "foos"."id" = 2[0m [["bar_id", 1], ["updated_at", Wed, 13 Nov 2013 13:04:26 UTC +00:00]]
|
2556
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2557
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2558
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2559
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
2560
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2561
|
+
[1m[35mSQL (3.3ms)[0m INSERT INTO "foos" ("bar_id", "created_at", "updated_at") VALUES (?, ?, ?) [["bar_id", nil], ["created_at", Thu, 14 Nov 2013 02:24:47 UTC +00:00], ["updated_at", Thu, 14 Nov 2013 02:24:47 UTC +00:00]]
|
2562
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2563
|
+
[1m[35mFoo Load (0.0ms)[0m SELECT "foos".id FROM "foos" WHERE "foos"."bar_id" IS NULL
|
2564
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2565
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "foos" ("bar_id", "created_at", "updated_at") VALUES (?, ?, ?) [["bar_id", nil], ["created_at", Thu, 14 Nov 2013 02:24:47 UTC +00:00], ["updated_at", Thu, 14 Nov 2013 02:24:47 UTC +00:00]]
|
2566
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2567
|
+
[1m[35mFoo Load (0.0ms)[0m SELECT "foos".id FROM "foos" WHERE "foos"."bar_id" IS NULL
|
2568
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2569
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "foos" ("bar_id", "created_at", "updated_at") VALUES (?, ?, ?) [["bar_id", nil], ["created_at", Thu, 14 Nov 2013 02:24:47 UTC +00:00], ["updated_at", Thu, 14 Nov 2013 02:24:47 UTC +00:00]]
|
2570
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2571
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2572
|
+
[1m[36mSQL (0.8ms)[0m [1mINSERT INTO "foos" ("bar_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["bar_id", nil], ["created_at", Thu, 14 Nov 2013 02:24:47 UTC +00:00], ["updated_at", Thu, 14 Nov 2013 02:24:47 UTC +00:00]]
|
2573
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2574
|
+
[1m[36mFoo Load (0.1ms)[0m [1mSELECT "foos".id FROM "foos" WHERE "foos"."bar_id" IS NULL[0m
|
2575
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2576
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "foos" ("bar_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["bar_id", nil], ["created_at", Thu, 14 Nov 2013 02:24:47 UTC +00:00], ["updated_at", Thu, 14 Nov 2013 02:24:47 UTC +00:00]]
|
2577
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2578
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2579
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "foos" ("bar_id", "created_at", "updated_at") VALUES (?, ?, ?) [["bar_id", nil], ["created_at", Thu, 14 Nov 2013 02:24:47 UTC +00:00], ["updated_at", Thu, 14 Nov 2013 02:24:47 UTC +00:00]]
|
2580
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2581
|
+
[1m[35mFoo Load (0.1ms)[0m SELECT "foos".id FROM "foos" WHERE "foos"."bar_id" IS NULL
|
2582
|
+
Connecting to database specified by database.yml
|
2583
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
2584
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2585
|
+
[1m[36mSQL (2.7ms)[0m [1mINSERT INTO "foos" ("bar_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["bar_id", nil], ["created_at", Thu, 14 Nov 2013 02:31:05 UTC +00:00], ["updated_at", Thu, 14 Nov 2013 02:31:05 UTC +00:00]]
|
2586
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
2587
|
+
[1m[36mFoo Load (0.1ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1[0m [["id", 1]]
|
2588
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2589
|
+
[1m[36mSQL (1.0ms)[0m [1mINSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Thu, 14 Nov 2013 02:31:05 UTC +00:00], ["updated_at", Thu, 14 Nov 2013 02:31:05 UTC +00:00]]
|
2590
|
+
[1m[35m (0.1ms)[0m UPDATE "foos" SET "bar_id" = 1, "updated_at" = '2013-11-14 02:31:05.499028' WHERE "foos"."id" = 1
|
2591
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2592
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2593
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2594
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2595
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "foos" ("bar_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["bar_id", nil], ["created_at", Thu, 14 Nov 2013 02:31:05 UTC +00:00], ["updated_at", Thu, 14 Nov 2013 02:31:05 UTC +00:00]]
|
2596
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2597
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2598
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = 1 AND "foos"."id" IN (1)
|
2599
|
+
[1m[36m (0.0ms)[0m [1mUPDATE "foos" SET "bar_id" = 1, "updated_at" = '2013-11-14 02:31:05.506536' WHERE "foos"."id" = 2[0m
|
2600
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2601
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2602
|
+
[1m[35m (0.0ms)[0m UPDATE "bars" SET "updated_at" = '2013-11-14 02:31:05.507186' WHERE "bars"."id" = 1
|
2603
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2604
|
+
[1m[35m (6.6ms)[0m rollback transaction
|
2605
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
2606
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2607
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "foos" ("bar_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["bar_id", nil], ["created_at", Thu, 14 Nov 2013 02:31:05 UTC +00:00], ["updated_at", Thu, 14 Nov 2013 02:31:05 UTC +00:00]]
|
2608
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2609
|
+
[1m[36mFoo Load (0.0ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1[0m [["id", 1]]
|
2610
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2611
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Thu, 14 Nov 2013 02:31:05 UTC +00:00], ["updated_at", Thu, 14 Nov 2013 02:31:05 UTC +00:00]]
|
2612
|
+
[1m[35m (0.1ms)[0m UPDATE "foos" SET "bar_id" = 1, "updated_at" = '2013-11-14 02:31:05.519762' WHERE "foos"."id" = 1
|
2613
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2614
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2615
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2616
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2617
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "foos" ("bar_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["bar_id", nil], ["created_at", Thu, 14 Nov 2013 02:31:05 UTC +00:00], ["updated_at", Thu, 14 Nov 2013 02:31:05 UTC +00:00]]
|
2618
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2619
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2620
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = 1 AND "foos"."id" IN (1)
|
2621
|
+
[1m[36m (0.0ms)[0m [1mUPDATE "foos" SET "bar_id" = 1, "updated_at" = '2013-11-14 02:31:05.522621' WHERE "foos"."id" = 2[0m
|
2622
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2623
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2624
|
+
[1m[35m (0.0ms)[0m UPDATE "bars" SET "updated_at" = '2013-11-14 02:31:05.523272' WHERE "bars"."id" = 1
|
2625
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2626
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2627
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2628
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
2629
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
2630
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2631
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "foos" ("bar_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["bar_id", nil], ["created_at", Thu, 14 Nov 2013 02:31:05 UTC +00:00], ["updated_at", Thu, 14 Nov 2013 02:31:05 UTC +00:00]]
|
2632
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2633
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2634
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "foos" ("bar_id", "created_at", "updated_at") VALUES (?, ?, ?) [["bar_id", nil], ["created_at", Thu, 14 Nov 2013 02:31:05 UTC +00:00], ["updated_at", Thu, 14 Nov 2013 02:31:05 UTC +00:00]]
|
2635
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2636
|
+
[1m[35mFoo Load (0.0ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 2]]
|
2637
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2638
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Thu, 14 Nov 2013 02:31:05 UTC +00:00], ["updated_at", Thu, 14 Nov 2013 02:31:05 UTC +00:00]]
|
2639
|
+
[1m[36m (0.1ms)[0m [1mUPDATE "foos" SET "bar_id" = 1, "updated_at" = '2013-11-14 02:31:05.528803' WHERE "foos"."id" = 2[0m
|
2640
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2641
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2642
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2643
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2644
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = 1 AND "foos"."id" IN (2)
|
2645
|
+
[1m[36m (0.0ms)[0m [1mUPDATE "foos" SET "bar_id" = 1, "updated_at" = '2013-11-14 02:31:05.530679' WHERE "foos"."id" = 1[0m
|
2646
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2647
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
2648
|
+
[1m[35m (0.0ms)[0m begin transaction
|
2649
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2650
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "foos" ("bar_id", "created_at", "updated_at") VALUES (?, ?, ?) [["bar_id", nil], ["created_at", Thu, 14 Nov 2013 02:31:05 UTC +00:00], ["updated_at", Thu, 14 Nov 2013 02:31:05 UTC +00:00]]
|
2651
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2652
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2653
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "foos" ("bar_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["bar_id", nil], ["created_at", Thu, 14 Nov 2013 02:31:05 UTC +00:00], ["updated_at", Thu, 14 Nov 2013 02:31:05 UTC +00:00]]
|
2654
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2655
|
+
[1m[36mFoo Load (0.0ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1[0m [["id", 2]]
|
2656
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2657
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "bars" ("created_at", "updated_at") VALUES (?, ?)[0m [["created_at", Thu, 14 Nov 2013 02:31:05 UTC +00:00], ["updated_at", Thu, 14 Nov 2013 02:31:05 UTC +00:00]]
|
2658
|
+
[1m[35m (0.1ms)[0m UPDATE "foos" SET "bar_id" = 1, "updated_at" = '2013-11-14 02:31:05.535536' WHERE "foos"."id" = 2
|
2659
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2660
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
2661
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
2662
|
+
[1m[35mFoo Load (0.0ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]]
|
2663
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
2664
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "foos" SET "bar_id" = NULL WHERE "foos"."bar_id" = 1 AND "foos"."id" IN (2)
|
2665
|
+
[1m[36m (0.0ms)[0m [1mUPDATE "foos" SET "bar_id" = 1, "updated_at" = '2013-11-14 02:31:05.537246' WHERE "foos"."id" = 1[0m
|
2666
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
2667
|
+
[1m[36m (7.1ms)[0m [1mrollback transaction[0m
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dirty_associations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jen Page
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 3.2.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 3.2.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: sqlite3
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|