activerecord_any_of 1.0.2 → 1.1

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.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +48 -13
  3. data/Rakefile +9 -0
  4. data/lib/activerecord_any_of/version.rb +1 -1
  5. data/lib/activerecord_any_of.rb +59 -36
  6. data/test/activerecord_any_of_test.rb +60 -17
  7. data/test/{dummy → dummy_rails3}/README.rdoc +0 -0
  8. data/test/{dummy → dummy_rails3}/Rakefile +0 -0
  9. data/test/{dummy → dummy_rails3}/app/assets/javascripts/application.js +0 -0
  10. data/test/{dummy → dummy_rails3}/app/assets/stylesheets/application.css +0 -0
  11. data/test/{dummy → dummy_rails3}/app/controllers/application_controller.rb +0 -0
  12. data/test/{dummy → dummy_rails3}/app/helpers/application_helper.rb +0 -0
  13. data/test/{dummy → dummy_rails3}/app/models/author.rb +0 -0
  14. data/test/{dummy → dummy_rails3}/app/models/post.rb +0 -0
  15. data/test/{dummy → dummy_rails3}/app/models/special_post.rb +0 -0
  16. data/test/{dummy → dummy_rails3}/app/models/sti_post.rb +0 -0
  17. data/test/{dummy → dummy_rails3}/app/views/layouts/application.html.erb +0 -0
  18. data/test/{dummy → dummy_rails3}/config/application.rb +0 -0
  19. data/test/{dummy → dummy_rails3}/config/boot.rb +0 -0
  20. data/test/{dummy → dummy_rails3}/config/database.yml +0 -0
  21. data/test/{dummy → dummy_rails3}/config/environment.rb +0 -0
  22. data/test/{dummy → dummy_rails3}/config/environments/development.rb +0 -0
  23. data/test/{dummy → dummy_rails3}/config/environments/production.rb +0 -0
  24. data/test/{dummy → dummy_rails3}/config/environments/test.rb +0 -0
  25. data/test/{dummy → dummy_rails3}/config/initializers/backtrace_silencers.rb +0 -0
  26. data/test/{dummy → dummy_rails3}/config/initializers/inflections.rb +0 -0
  27. data/test/{dummy → dummy_rails3}/config/initializers/mime_types.rb +0 -0
  28. data/test/{dummy → dummy_rails3}/config/initializers/secret_token.rb +0 -0
  29. data/test/{dummy → dummy_rails3}/config/initializers/session_store.rb +0 -0
  30. data/test/{dummy → dummy_rails3}/config/initializers/wrap_parameters.rb +0 -0
  31. data/test/{dummy → dummy_rails3}/config/locales/en.yml +0 -0
  32. data/test/{dummy → dummy_rails3}/config/routes.rb +0 -0
  33. data/test/{dummy → dummy_rails3}/config.ru +0 -0
  34. data/test/{dummy → dummy_rails3}/db/development.sqlite3 +0 -0
  35. data/test/{dummy → dummy_rails3}/db/migrate/20130617172335_create_authors.rb +0 -0
  36. data/test/{dummy → dummy_rails3}/db/migrate/20130617173313_create_posts.rb +0 -0
  37. data/test/{dummy → dummy_rails3}/db/schema.rb +0 -0
  38. data/test/dummy_rails3/db/test.sqlite3 +0 -0
  39. data/test/{dummy → dummy_rails3}/log/development.log +10 -0
  40. data/test/{dummy → dummy_rails3}/log/test.log +288 -0
  41. data/test/{dummy → dummy_rails3}/public/404.html +0 -0
  42. data/test/{dummy → dummy_rails3}/public/422.html +0 -0
  43. data/test/{dummy → dummy_rails3}/public/500.html +0 -0
  44. data/test/{dummy → dummy_rails3}/public/favicon.ico +0 -0
  45. data/test/{dummy → dummy_rails3}/script/rails +0 -0
  46. data/test/{dummy → dummy_rails3}/test/fixtures/authors.yml +0 -0
  47. data/test/{dummy → dummy_rails3}/test/fixtures/posts.yml +0 -0
  48. data/test/{dummy → dummy_rails3}/test/unit/author_test.rb +0 -0
  49. data/test/{dummy → dummy_rails3}/test/unit/post_test.rb +0 -0
  50. data/test/dummy_rails4/README.rdoc +28 -0
  51. data/test/dummy_rails4/Rakefile +6 -0
  52. data/test/dummy_rails4/app/assets/javascripts/application.js +13 -0
  53. data/test/dummy_rails4/app/assets/stylesheets/application.css +13 -0
  54. data/test/dummy_rails4/app/controllers/application_controller.rb +5 -0
  55. data/test/dummy_rails4/app/helpers/application_helper.rb +2 -0
  56. data/test/dummy_rails4/app/models/author.rb +3 -0
  57. data/test/dummy_rails4/app/models/post.rb +3 -0
  58. data/test/dummy_rails4/app/models/special_post.rb +2 -0
  59. data/test/dummy_rails4/app/models/sti_post.rb +2 -0
  60. data/test/dummy_rails4/app/views/layouts/application.html.erb +14 -0
  61. data/test/dummy_rails4/bin/bundle +3 -0
  62. data/test/dummy_rails4/bin/rails +4 -0
  63. data/test/dummy_rails4/bin/rake +4 -0
  64. data/test/dummy_rails4/config/application.rb +23 -0
  65. data/test/dummy_rails4/config/boot.rb +5 -0
  66. data/test/dummy_rails4/config/database.yml +25 -0
  67. data/test/dummy_rails4/config/environment.rb +5 -0
  68. data/test/dummy_rails4/config/environments/development.rb +29 -0
  69. data/test/dummy_rails4/config/environments/production.rb +80 -0
  70. data/test/dummy_rails4/config/environments/test.rb +36 -0
  71. data/test/dummy_rails4/config/initializers/backtrace_silencers.rb +7 -0
  72. data/test/dummy_rails4/config/initializers/filter_parameter_logging.rb +4 -0
  73. data/test/dummy_rails4/config/initializers/inflections.rb +16 -0
  74. data/test/dummy_rails4/config/initializers/mime_types.rb +5 -0
  75. data/test/dummy_rails4/config/initializers/secret_token.rb +12 -0
  76. data/test/dummy_rails4/config/initializers/session_store.rb +3 -0
  77. data/test/dummy_rails4/config/initializers/wrap_parameters.rb +14 -0
  78. data/test/dummy_rails4/config/locales/en.yml +23 -0
  79. data/test/dummy_rails4/config/routes.rb +56 -0
  80. data/test/dummy_rails4/config.ru +4 -0
  81. data/test/dummy_rails4/db/development.sqlite3 +0 -0
  82. data/test/dummy_rails4/db/migrate/20130617172335_create_authors.rb +9 -0
  83. data/test/dummy_rails4/db/migrate/20130617173313_create_posts.rb +12 -0
  84. data/test/dummy_rails4/db/schema.rb +31 -0
  85. data/test/{dummy → dummy_rails4}/db/test.sqlite3 +0 -0
  86. data/test/dummy_rails4/log/development.log +21 -0
  87. data/test/dummy_rails4/log/test.log +437 -0
  88. data/test/dummy_rails4/public/404.html +58 -0
  89. data/test/dummy_rails4/public/422.html +58 -0
  90. data/test/dummy_rails4/public/500.html +57 -0
  91. data/test/dummy_rails4/public/favicon.ico +0 -0
  92. data/test/dummy_rails4/test/fixtures/authors.yml +7 -0
  93. data/test/dummy_rails4/test/fixtures/posts.yml +13 -0
  94. data/test/dummy_rails4/test/unit/author_test.rb +7 -0
  95. data/test/dummy_rails4/test/unit/post_test.rb +7 -0
  96. data/test/test_helper.rb +4 -4
  97. metadata +180 -88
@@ -2585,3 +2585,291 @@ Connecting to database specified by database.yml
2585
2585
  Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE "authors"."name" = 'David' LIMIT 1
2586
2586
  Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."author_id" = 1 AND (NOT (("posts"."author_id" = 1 AND "posts"."body" = 'Such a lovely day' OR "posts"."author_id" = 1 AND "posts"."type" = 'SpecialPost')))
2587
2587
   (0.0ms) rollback transaction
2588
+ Connecting to database specified by database.yml
2589
+  (1.0ms) begin transaction
2590
+ Fixture Delete (0.1ms) DELETE FROM "authors"
2591
+ Fixture Insert (0.1ms) INSERT INTO "authors" ("id", "name", "created_at", "updated_at") VALUES (1, 'David', '2013-08-31 13:38:29', '2013-08-31 13:38:29')
2592
+ Fixture Insert (0.0ms) INSERT INTO "authors" ("id", "name", "created_at", "updated_at") VALUES (2, 'Mary', '2013-08-31 13:38:29', '2013-08-31 13:38:29')
2593
+ Fixture Insert (0.0ms) INSERT INTO "authors" ("id", "name", "created_at", "updated_at") VALUES (3, 'Bob', '2013-08-31 13:38:29', '2013-08-31 13:38:29')
2594
+ Fixture Delete (0.0ms) DELETE FROM "posts"
2595
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (1, 1, 'Welcome to the weblog', 'Such a lovely day', 'Post', '2013-08-31 13:38:29', '2013-08-31 13:38:29')
2596
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (2, 1, 'So I was thinking', 'Like I hopefully always am', 'SpecialPost', '2013-08-31 13:38:29', '2013-08-31 13:38:29')
2597
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (3, 0, 'I don''t have any comments', 'I just don''t want to', 'Post', '2013-08-31 13:38:29', '2013-08-31 13:38:29')
2598
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (4, 1, 'sti comments', 'hello', 'Post', '2013-08-31 13:38:29', '2013-08-31 13:38:29')
2599
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (5, 1, 'sti me', 'hello', 'StiPost', '2013-08-31 13:38:29', '2013-08-31 13:38:29')
2600
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (6, 1, 'habtm sti test', 'hello', 'Post', '2013-08-31 13:38:29', '2013-08-31 13:38:29')
2601
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (7, 2, 'eager loading with OR''d conditions', 'hello', 'Post', '2013-08-31 13:38:29', '2013-08-31 13:38:29')
2602
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (8, 3, 'misc post by bob', 'hello', 'Post', '2013-08-31 13:38:29', '2013-08-31 13:38:29')
2603
+ Fixture Insert (0.1ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (9, 2, 'misc post by mary', 'hello', 'Post', '2013-08-31 13:38:29', '2013-08-31 13:38:29')
2604
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (10, 3, 'other post by bob', 'hello', 'Post', '2013-08-31 13:38:29', '2013-08-31 13:38:29')
2605
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (11, 2, 'other post by mary', 'hello', 'Post', '2013-08-31 13:38:29', '2013-08-31 13:38:29')
2606
+  (274.2ms) commit transaction
2607
+  (0.1ms) begin transaction
2608
+ Author Load (0.2ms) SELECT "authors".* FROM "authors" WHERE (name like '%av%') AND (("authors"."name" = 'David' AND (name like '%av%') OR "authors"."name" = 'Mary' AND (name like '%av%')))
2609
+  (0.1ms) rollback transaction
2610
+  (0.1ms) begin transaction
2611
+  (0.0ms) rollback transaction
2612
+  (0.0ms) begin transaction
2613
+  (0.0ms) rollback transaction
2614
+  (0.0ms) begin transaction
2615
+ Author Load (0.1ms) SELECT "authors".* FROM "authors" INNER JOIN "posts" ON "posts"."author_id" = "authors"."id" WHERE (("posts"."title" = 'Welcome to the weblog' OR "posts"."title" = 'eager loading with OR''d conditions'))
2616
+ SQL (0.1ms) SELECT "authors"."id" AS t0_r0, "authors"."name" AS t0_r1, "authors"."created_at" AS t0_r2, "authors"."updated_at" AS t0_r3, "posts"."id" AS t1_r0, "posts"."title" AS t1_r1, "posts"."body" AS t1_r2, "posts"."author_id" AS t1_r3, "posts"."type" AS t1_r4, "posts"."created_at" AS t1_r5, "posts"."updated_at" AS t1_r6 FROM "authors" LEFT OUTER JOIN "posts" ON "posts"."author_id" = "authors"."id" WHERE (("posts"."title" = 'Welcome to the weblog' OR "posts"."title" = 'eager loading with OR''d conditions'))
2617
+  (0.0ms) rollback transaction
2618
+  (0.0ms) begin transaction
2619
+ Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE (("authors"."name" = 'David' OR "authors"."name" = 'Mary'))
2620
+ Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE (("authors"."name" = 'David' OR (name = 'Mary')))
2621
+ Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE ((("authors"."name" = 'David' OR (name = 'Mary')) OR "authors"."name" = 'Bob'))
2622
+ Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE ((("authors"."name" = 'David' OR (name = 'Mary')) OR "authors"."name" = 'Bob' AND "authors"."id" = 3))
2623
+ Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE (name IS NOT 'Mary') AND (("authors"."name" = 'David' OR (name IS NOT 'Mary') AND (name = 'Mary')))
2624
+  (0.0ms) rollback transaction
2625
+  (0.0ms) begin transaction
2626
+ Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE "authors"."name" = 'David' LIMIT 1
2627
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."author_id" = 1 AND (("posts"."author_id" = 1 AND "posts"."body" = 'Such a lovely day' OR "posts"."author_id" = 1 AND "posts"."type" = 'SpecialPost'))
2628
+  (0.0ms) rollback transaction
2629
+  (0.0ms) begin transaction
2630
+ Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE (NOT (("authors"."name" = 'David' OR "authors"."name" = 'Mary')))
2631
+  (0.0ms) rollback transaction
2632
+  (0.0ms) begin transaction
2633
+ Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE "authors"."name" = 'David' LIMIT 1
2634
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."author_id" = 1 AND (NOT (("posts"."author_id" = 1 AND "posts"."body" = 'Such a lovely day' OR "posts"."author_id" = 1 AND "posts"."type" = 'SpecialPost')))
2635
+  (0.0ms) rollback transaction
2636
+ Connecting to database specified by database.yml
2637
+  (0.2ms) begin transaction
2638
+ Fixture Delete (0.1ms) DELETE FROM "authors"
2639
+ Fixture Insert (0.1ms) INSERT INTO "authors" ("id", "name", "created_at", "updated_at") VALUES (1, 'David', '2013-08-31 13:38:41', '2013-08-31 13:38:41')
2640
+ Fixture Insert (0.0ms) INSERT INTO "authors" ("id", "name", "created_at", "updated_at") VALUES (2, 'Mary', '2013-08-31 13:38:41', '2013-08-31 13:38:41')
2641
+ Fixture Insert (0.0ms) INSERT INTO "authors" ("id", "name", "created_at", "updated_at") VALUES (3, 'Bob', '2013-08-31 13:38:41', '2013-08-31 13:38:41')
2642
+ Fixture Delete (0.0ms) DELETE FROM "posts"
2643
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (1, 1, 'Welcome to the weblog', 'Such a lovely day', 'Post', '2013-08-31 13:38:41', '2013-08-31 13:38:41')
2644
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (2, 1, 'So I was thinking', 'Like I hopefully always am', 'SpecialPost', '2013-08-31 13:38:41', '2013-08-31 13:38:41')
2645
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (3, 0, 'I don''t have any comments', 'I just don''t want to', 'Post', '2013-08-31 13:38:41', '2013-08-31 13:38:41')
2646
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (4, 1, 'sti comments', 'hello', 'Post', '2013-08-31 13:38:41', '2013-08-31 13:38:41')
2647
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (5, 1, 'sti me', 'hello', 'StiPost', '2013-08-31 13:38:41', '2013-08-31 13:38:41')
2648
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (6, 1, 'habtm sti test', 'hello', 'Post', '2013-08-31 13:38:41', '2013-08-31 13:38:41')
2649
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (7, 2, 'eager loading with OR''d conditions', 'hello', 'Post', '2013-08-31 13:38:41', '2013-08-31 13:38:41')
2650
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (8, 3, 'misc post by bob', 'hello', 'Post', '2013-08-31 13:38:41', '2013-08-31 13:38:41')
2651
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (9, 2, 'misc post by mary', 'hello', 'Post', '2013-08-31 13:38:41', '2013-08-31 13:38:41')
2652
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (10, 3, 'other post by bob', 'hello', 'Post', '2013-08-31 13:38:41', '2013-08-31 13:38:41')
2653
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (11, 2, 'other post by mary', 'hello', 'Post', '2013-08-31 13:38:41', '2013-08-31 13:38:41')
2654
+  (307.0ms) commit transaction
2655
+  (0.1ms) begin transaction
2656
+ Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE (name like '%av%') AND (("authors"."name" = 'David' AND (name like '%av%') OR "authors"."name" = 'Mary' AND (name like '%av%')))
2657
+  (0.0ms) rollback transaction
2658
+  (0.0ms) begin transaction
2659
+  (0.0ms) rollback transaction
2660
+  (0.0ms) begin transaction
2661
+  (0.0ms) rollback transaction
2662
+  (0.0ms) begin transaction
2663
+ Author Load (0.1ms) SELECT "authors".* FROM "authors" INNER JOIN "posts" ON "posts"."author_id" = "authors"."id" WHERE (("posts"."title" = 'Welcome to the weblog' OR "posts"."title" = 'eager loading with OR''d conditions'))
2664
+ SQL (0.1ms) SELECT "authors"."id" AS t0_r0, "authors"."name" AS t0_r1, "authors"."created_at" AS t0_r2, "authors"."updated_at" AS t0_r3, "posts"."id" AS t1_r0, "posts"."title" AS t1_r1, "posts"."body" AS t1_r2, "posts"."author_id" AS t1_r3, "posts"."type" AS t1_r4, "posts"."created_at" AS t1_r5, "posts"."updated_at" AS t1_r6 FROM "authors" LEFT OUTER JOIN "posts" ON "posts"."author_id" = "authors"."id" WHERE (("posts"."title" = 'Welcome to the weblog' OR "posts"."title" = 'eager loading with OR''d conditions'))
2665
+  (0.0ms) rollback transaction
2666
+  (0.0ms) begin transaction
2667
+ Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE (("authors"."name" = 'David' OR "authors"."name" = 'Mary'))
2668
+ Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE (("authors"."name" = 'David' OR (name = 'Mary')))
2669
+ Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE ((("authors"."name" = 'David' OR (name = 'Mary')) OR "authors"."name" = 'Bob'))
2670
+ Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE ((("authors"."name" = 'David' OR (name = 'Mary')) OR "authors"."name" = 'Bob' AND "authors"."id" = 3))
2671
+ Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE (name IS NOT 'Mary') AND (("authors"."name" = 'David' OR (name IS NOT 'Mary') AND (name = 'Mary')))
2672
+  (0.0ms) rollback transaction
2673
+  (0.0ms) begin transaction
2674
+ Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."name" = 'David' LIMIT 1
2675
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."author_id" = 1 AND (("posts"."author_id" = 1 AND "posts"."body" = 'Such a lovely day' OR "posts"."author_id" = 1 AND "posts"."type" = 'SpecialPost'))
2676
+  (0.0ms) rollback transaction
2677
+  (0.0ms) begin transaction
2678
+ Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE (NOT (("authors"."name" = 'David' OR "authors"."name" = 'Mary')))
2679
+  (0.0ms) rollback transaction
2680
+  (0.0ms) begin transaction
2681
+ Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."name" = 'David' LIMIT 1
2682
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."author_id" = 1 AND (NOT (("posts"."author_id" = 1 AND "posts"."body" = 'Such a lovely day' OR "posts"."author_id" = 1 AND "posts"."type" = 'SpecialPost')))
2683
+  (0.0ms) rollback transaction
2684
+ Connecting to database specified by database.yml
2685
+  (0.2ms) begin transaction
2686
+ Fixture Delete (0.1ms) DELETE FROM "authors"
2687
+ Fixture Insert (0.1ms) INSERT INTO "authors" ("id", "name", "created_at", "updated_at") VALUES (1, 'David', '2013-08-31 13:52:28', '2013-08-31 13:52:28')
2688
+ Fixture Insert (0.0ms) INSERT INTO "authors" ("id", "name", "created_at", "updated_at") VALUES (2, 'Mary', '2013-08-31 13:52:28', '2013-08-31 13:52:28')
2689
+ Fixture Insert (0.0ms) INSERT INTO "authors" ("id", "name", "created_at", "updated_at") VALUES (3, 'Bob', '2013-08-31 13:52:28', '2013-08-31 13:52:28')
2690
+ Fixture Delete (0.0ms) DELETE FROM "posts"
2691
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (1, 1, 'Welcome to the weblog', 'Such a lovely day', 'Post', '2013-08-31 13:52:28', '2013-08-31 13:52:28')
2692
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (2, 1, 'So I was thinking', 'Like I hopefully always am', 'SpecialPost', '2013-08-31 13:52:28', '2013-08-31 13:52:28')
2693
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (3, 0, 'I don''t have any comments', 'I just don''t want to', 'Post', '2013-08-31 13:52:28', '2013-08-31 13:52:28')
2694
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (4, 1, 'sti comments', 'hello', 'Post', '2013-08-31 13:52:28', '2013-08-31 13:52:28')
2695
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (5, 1, 'sti me', 'hello', 'StiPost', '2013-08-31 13:52:28', '2013-08-31 13:52:28')
2696
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (6, 1, 'habtm sti test', 'hello', 'Post', '2013-08-31 13:52:28', '2013-08-31 13:52:28')
2697
+ Fixture Insert (0.1ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (7, 2, 'eager loading with OR''d conditions', 'hello', 'Post', '2013-08-31 13:52:28', '2013-08-31 13:52:28')
2698
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (8, 3, 'misc post by bob', 'hello', 'Post', '2013-08-31 13:52:28', '2013-08-31 13:52:28')
2699
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (9, 2, 'misc post by mary', 'hello', 'Post', '2013-08-31 13:52:28', '2013-08-31 13:52:28')
2700
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (10, 3, 'other post by bob', 'hello', 'Post', '2013-08-31 13:52:28', '2013-08-31 13:52:28')
2701
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (11, 2, 'other post by mary', 'hello', 'Post', '2013-08-31 13:52:28', '2013-08-31 13:52:28')
2702
+  (280.6ms) commit transaction
2703
+  (0.1ms) begin transaction
2704
+ Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE (name like '%av%') AND (("authors"."name" = 'David' AND (name like '%av%') OR "authors"."name" = 'Mary' AND (name like '%av%')))
2705
+  (0.0ms) rollback transaction
2706
+  (0.0ms) begin transaction
2707
+  (0.0ms) rollback transaction
2708
+  (0.0ms) begin transaction
2709
+  (0.0ms) rollback transaction
2710
+  (0.0ms) begin transaction
2711
+ Author Load (0.1ms) SELECT "authors".* FROM "authors" INNER JOIN "posts" ON "posts"."author_id" = "authors"."id" WHERE (("posts"."title" = 'Welcome to the weblog' OR "posts"."title" = 'eager loading with OR''d conditions'))
2712
+ SQL (0.1ms) SELECT "authors"."id" AS t0_r0, "authors"."name" AS t0_r1, "authors"."created_at" AS t0_r2, "authors"."updated_at" AS t0_r3, "posts"."id" AS t1_r0, "posts"."title" AS t1_r1, "posts"."body" AS t1_r2, "posts"."author_id" AS t1_r3, "posts"."type" AS t1_r4, "posts"."created_at" AS t1_r5, "posts"."updated_at" AS t1_r6 FROM "authors" LEFT OUTER JOIN "posts" ON "posts"."author_id" = "authors"."id" WHERE (("posts"."title" = 'Welcome to the weblog' OR "posts"."title" = 'eager loading with OR''d conditions'))
2713
+  (0.0ms) rollback transaction
2714
+  (0.0ms) begin transaction
2715
+ Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE (("authors"."name" = 'David' OR "authors"."name" = 'Mary'))
2716
+ Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE (("authors"."name" = 'David' OR (name = 'Mary')))
2717
+ Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE ((("authors"."name" = 'David' OR (name = 'Mary')) OR "authors"."name" = 'Bob'))
2718
+ Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE ((("authors"."name" = 'David' OR (name = 'Mary')) OR "authors"."name" = 'Bob' AND "authors"."id" = 3))
2719
+ Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE (name IS NOT 'Mary') AND (("authors"."name" = 'David' OR (name IS NOT 'Mary') AND (name = 'Mary')))
2720
+  (0.0ms) rollback transaction
2721
+  (0.0ms) begin transaction
2722
+ Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE "authors"."name" = 'David' LIMIT 1
2723
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."author_id" = 1 AND (("posts"."author_id" = 1 AND "posts"."body" = 'Such a lovely day' OR "posts"."author_id" = 1 AND "posts"."type" = 'SpecialPost'))
2724
+  (0.0ms) rollback transaction
2725
+  (0.0ms) begin transaction
2726
+ Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE (NOT (("authors"."name" = 'David' OR "authors"."name" = 'Mary')))
2727
+  (0.0ms) rollback transaction
2728
+  (0.0ms) begin transaction
2729
+ Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."name" = 'David' LIMIT 1
2730
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."author_id" = 1 AND (NOT (("posts"."author_id" = 1 AND "posts"."body" = 'Such a lovely day' OR "posts"."author_id" = 1 AND "posts"."type" = 'SpecialPost')))
2731
+  (0.0ms) rollback transaction
2732
+ Connecting to database specified by database.yml
2733
+  (0.2ms) begin transaction
2734
+ Fixture Delete (0.1ms) DELETE FROM "authors"
2735
+ Fixture Insert (0.1ms) INSERT INTO "authors" ("id", "name", "created_at", "updated_at") VALUES (1, 'David', '2013-08-31 14:22:25', '2013-08-31 14:22:25')
2736
+ Fixture Insert (0.0ms) INSERT INTO "authors" ("id", "name", "created_at", "updated_at") VALUES (2, 'Mary', '2013-08-31 14:22:25', '2013-08-31 14:22:25')
2737
+ Fixture Insert (0.0ms) INSERT INTO "authors" ("id", "name", "created_at", "updated_at") VALUES (3, 'Bob', '2013-08-31 14:22:25', '2013-08-31 14:22:25')
2738
+ Fixture Delete (0.0ms) DELETE FROM "posts"
2739
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (1, 1, 'Welcome to the weblog', 'Such a lovely day', 'Post', '2013-08-31 14:22:25', '2013-08-31 14:22:25')
2740
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (2, 1, 'So I was thinking', 'Like I hopefully always am', 'SpecialPost', '2013-08-31 14:22:25', '2013-08-31 14:22:25')
2741
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (3, 0, 'I don''t have any comments', 'I just don''t want to', 'Post', '2013-08-31 14:22:25', '2013-08-31 14:22:25')
2742
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (4, 1, 'sti comments', 'hello', 'Post', '2013-08-31 14:22:25', '2013-08-31 14:22:25')
2743
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (5, 1, 'sti me', 'hello', 'StiPost', '2013-08-31 14:22:25', '2013-08-31 14:22:25')
2744
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (6, 1, 'habtm sti test', 'hello', 'Post', '2013-08-31 14:22:25', '2013-08-31 14:22:25')
2745
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (7, 2, 'eager loading with OR''d conditions', 'hello', 'Post', '2013-08-31 14:22:25', '2013-08-31 14:22:25')
2746
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (8, 3, 'misc post by bob', 'hello', 'Post', '2013-08-31 14:22:25', '2013-08-31 14:22:25')
2747
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (9, 2, 'misc post by mary', 'hello', 'Post', '2013-08-31 14:22:25', '2013-08-31 14:22:25')
2748
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (10, 3, 'other post by bob', 'hello', 'Post', '2013-08-31 14:22:25', '2013-08-31 14:22:25')
2749
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (11, 2, 'other post by mary', 'hello', 'Post', '2013-08-31 14:22:25', '2013-08-31 14:22:25')
2750
+  (296.3ms) commit transaction
2751
+  (0.1ms) begin transaction
2752
+ Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE (name like '%av%') AND (("authors"."name" = 'David' AND (name like '%av%') OR "authors"."name" = 'Mary' AND (name like '%av%')))
2753
+  (0.0ms) rollback transaction
2754
+  (0.0ms) begin transaction
2755
+  (0.0ms) rollback transaction
2756
+  (0.0ms) begin transaction
2757
+  (0.0ms) rollback transaction
2758
+  (0.0ms) begin transaction
2759
+ Author Load (0.1ms) SELECT "authors".* FROM "authors" INNER JOIN "posts" ON "posts"."author_id" = "authors"."id" WHERE (("posts"."title" = 'Welcome to the weblog' OR "posts"."title" = 'eager loading with OR''d conditions'))
2760
+ SQL (0.1ms) SELECT "authors"."id" AS t0_r0, "authors"."name" AS t0_r1, "authors"."created_at" AS t0_r2, "authors"."updated_at" AS t0_r3, "posts"."id" AS t1_r0, "posts"."title" AS t1_r1, "posts"."body" AS t1_r2, "posts"."author_id" AS t1_r3, "posts"."type" AS t1_r4, "posts"."created_at" AS t1_r5, "posts"."updated_at" AS t1_r6 FROM "authors" LEFT OUTER JOIN "posts" ON "posts"."author_id" = "authors"."id" WHERE (("posts"."title" = 'Welcome to the weblog' OR "posts"."title" = 'eager loading with OR''d conditions'))
2761
+  (0.0ms) rollback transaction
2762
+  (0.0ms) begin transaction
2763
+ Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE (("authors"."name" = 'David' OR "authors"."name" = 'Mary'))
2764
+ Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE (("authors"."name" = 'David' OR (name = 'Mary')))
2765
+ Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE ((("authors"."name" = 'David' OR (name = 'Mary')) OR "authors"."name" = 'Bob'))
2766
+ Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE ((("authors"."name" = 'David' OR (name = 'Mary')) OR "authors"."name" = 'Bob' AND "authors"."id" = 3))
2767
+ Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE (name IS NOT 'Mary') AND (("authors"."name" = 'David' OR (name IS NOT 'Mary') AND (name = 'Mary')))
2768
+  (0.0ms) rollback transaction
2769
+  (0.0ms) begin transaction
2770
+ Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."name" = 'David' LIMIT 1
2771
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."author_id" = 1 AND (("posts"."author_id" = 1 AND "posts"."body" = 'Such a lovely day' OR "posts"."author_id" = 1 AND "posts"."type" = 'SpecialPost'))
2772
+  (0.0ms) rollback transaction
2773
+  (0.0ms) begin transaction
2774
+ Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE (NOT (("authors"."name" = 'David' OR "authors"."name" = 'Mary')))
2775
+  (0.0ms) rollback transaction
2776
+  (0.0ms) begin transaction
2777
+ Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."name" = 'David' LIMIT 1
2778
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."author_id" = 1 AND (NOT (("posts"."author_id" = 1 AND "posts"."body" = 'Such a lovely day' OR "posts"."author_id" = 1 AND "posts"."type" = 'SpecialPost')))
2779
+  (0.0ms) rollback transaction
2780
+ Connecting to database specified by database.yml
2781
+  (0.3ms) begin transaction
2782
+ Fixture Delete (0.1ms) DELETE FROM "authors"
2783
+ Fixture Insert (0.1ms) INSERT INTO "authors" ("id", "name", "created_at", "updated_at") VALUES (1, 'David', '2013-08-31 15:35:55', '2013-08-31 15:35:55')
2784
+ Fixture Insert (0.0ms) INSERT INTO "authors" ("id", "name", "created_at", "updated_at") VALUES (2, 'Mary', '2013-08-31 15:35:55', '2013-08-31 15:35:55')
2785
+ Fixture Insert (0.0ms) INSERT INTO "authors" ("id", "name", "created_at", "updated_at") VALUES (3, 'Bob', '2013-08-31 15:35:55', '2013-08-31 15:35:55')
2786
+ Fixture Delete (0.0ms) DELETE FROM "posts"
2787
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (1, 1, 'Welcome to the weblog', 'Such a lovely day', 'Post', '2013-08-31 15:35:55', '2013-08-31 15:35:55')
2788
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (2, 1, 'So I was thinking', 'Like I hopefully always am', 'SpecialPost', '2013-08-31 15:35:55', '2013-08-31 15:35:55')
2789
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (3, 0, 'I don''t have any comments', 'I just don''t want to', 'Post', '2013-08-31 15:35:55', '2013-08-31 15:35:55')
2790
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (4, 1, 'sti comments', 'hello', 'Post', '2013-08-31 15:35:55', '2013-08-31 15:35:55')
2791
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (5, 1, 'sti me', 'hello', 'StiPost', '2013-08-31 15:35:55', '2013-08-31 15:35:55')
2792
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (6, 1, 'habtm sti test', 'hello', 'Post', '2013-08-31 15:35:55', '2013-08-31 15:35:55')
2793
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (7, 2, 'eager loading with OR''d conditions', 'hello', 'Post', '2013-08-31 15:35:55', '2013-08-31 15:35:55')
2794
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (8, 3, 'misc post by bob', 'hello', 'Post', '2013-08-31 15:35:55', '2013-08-31 15:35:55')
2795
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (9, 2, 'misc post by mary', 'hello', 'Post', '2013-08-31 15:35:55', '2013-08-31 15:35:55')
2796
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (10, 3, 'other post by bob', 'hello', 'Post', '2013-08-31 15:35:55', '2013-08-31 15:35:55')
2797
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (11, 2, 'other post by mary', 'hello', 'Post', '2013-08-31 15:35:55', '2013-08-31 15:35:55')
2798
+  (354.2ms) commit transaction
2799
+  (0.1ms) begin transaction
2800
+ Author Load (0.2ms) SELECT "authors".* FROM "authors" WHERE (name like '%av%') AND (("authors"."name" = 'David' AND (name like '%av%') OR "authors"."name" = 'Mary' AND (name like '%av%')))
2801
+  (0.1ms) rollback transaction
2802
+  (0.1ms) begin transaction
2803
+  (0.0ms) rollback transaction
2804
+  (0.1ms) begin transaction
2805
+  (0.0ms) rollback transaction
2806
+  (0.0ms) begin transaction
2807
+ Author Load (0.1ms) SELECT "authors".* FROM "authors" INNER JOIN "posts" ON "posts"."author_id" = "authors"."id" WHERE (("posts"."title" = 'Welcome to the weblog' OR "posts"."title" = 'eager loading with OR''d conditions'))
2808
+ SQL (0.1ms) SELECT "authors"."id" AS t0_r0, "authors"."name" AS t0_r1, "authors"."created_at" AS t0_r2, "authors"."updated_at" AS t0_r3, "posts"."id" AS t1_r0, "posts"."title" AS t1_r1, "posts"."body" AS t1_r2, "posts"."author_id" AS t1_r3, "posts"."type" AS t1_r4, "posts"."created_at" AS t1_r5, "posts"."updated_at" AS t1_r6 FROM "authors" LEFT OUTER JOIN "posts" ON "posts"."author_id" = "authors"."id" WHERE (("posts"."title" = 'Welcome to the weblog' OR "posts"."title" = 'eager loading with OR''d conditions'))
2809
+  (0.0ms) rollback transaction
2810
+  (0.0ms) begin transaction
2811
+ Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE (("authors"."name" = 'David' OR "authors"."name" = 'Mary'))
2812
+ Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE (("authors"."name" = 'David' OR (name = 'Mary')))
2813
+ Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE ((("authors"."name" = 'David' OR (name = 'Mary')) OR "authors"."name" = 'Bob'))
2814
+ Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE ((("authors"."name" = 'David' OR (name = 'Mary')) OR "authors"."name" = 'Bob' AND "authors"."id" = 3))
2815
+ Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE (name IS NOT 'Mary') AND (("authors"."name" = 'David' OR (name IS NOT 'Mary') AND (name = 'Mary')))
2816
+  (0.0ms) rollback transaction
2817
+  (0.1ms) begin transaction
2818
+ Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE "authors"."name" = 'David' LIMIT 1
2819
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."author_id" = 1 AND (("posts"."author_id" = 1 AND "posts"."body" = 'Such a lovely day' OR "posts"."author_id" = 1 AND "posts"."type" = 'SpecialPost'))
2820
+  (0.0ms) rollback transaction
2821
+  (0.0ms) begin transaction
2822
+ Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE (NOT (("authors"."name" = 'David' OR "authors"."name" = 'Mary')))
2823
+  (0.0ms) rollback transaction
2824
+  (0.0ms) begin transaction
2825
+ Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE "authors"."name" = 'David' LIMIT 1
2826
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."author_id" = 1 AND (NOT (("posts"."author_id" = 1 AND "posts"."body" = 'Such a lovely day' OR "posts"."author_id" = 1 AND "posts"."type" = 'SpecialPost')))
2827
+  (0.0ms) rollback transaction
2828
+ Connecting to database specified by database.yml
2829
+  (0.2ms) begin transaction
2830
+ Fixture Delete (0.1ms) DELETE FROM "authors"
2831
+ Fixture Insert (0.1ms) INSERT INTO "authors" ("id", "name", "created_at", "updated_at") VALUES (1, 'David', '2013-08-31 15:36:52', '2013-08-31 15:36:52')
2832
+ Fixture Insert (0.0ms) INSERT INTO "authors" ("id", "name", "created_at", "updated_at") VALUES (2, 'Mary', '2013-08-31 15:36:52', '2013-08-31 15:36:52')
2833
+ Fixture Insert (0.0ms) INSERT INTO "authors" ("id", "name", "created_at", "updated_at") VALUES (3, 'Bob', '2013-08-31 15:36:52', '2013-08-31 15:36:52')
2834
+ Fixture Delete (0.0ms) DELETE FROM "posts"
2835
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (1, 1, 'Welcome to the weblog', 'Such a lovely day', 'Post', '2013-08-31 15:36:52', '2013-08-31 15:36:52')
2836
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (2, 1, 'So I was thinking', 'Like I hopefully always am', 'SpecialPost', '2013-08-31 15:36:52', '2013-08-31 15:36:52')
2837
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (3, 0, 'I don''t have any comments', 'I just don''t want to', 'Post', '2013-08-31 15:36:52', '2013-08-31 15:36:52')
2838
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (4, 1, 'sti comments', 'hello', 'Post', '2013-08-31 15:36:52', '2013-08-31 15:36:52')
2839
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (5, 1, 'sti me', 'hello', 'StiPost', '2013-08-31 15:36:52', '2013-08-31 15:36:52')
2840
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (6, 1, 'habtm sti test', 'hello', 'Post', '2013-08-31 15:36:52', '2013-08-31 15:36:52')
2841
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (7, 2, 'eager loading with OR''d conditions', 'hello', 'Post', '2013-08-31 15:36:52', '2013-08-31 15:36:52')
2842
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (8, 3, 'misc post by bob', 'hello', 'Post', '2013-08-31 15:36:52', '2013-08-31 15:36:52')
2843
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (9, 2, 'misc post by mary', 'hello', 'Post', '2013-08-31 15:36:52', '2013-08-31 15:36:52')
2844
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (10, 3, 'other post by bob', 'hello', 'Post', '2013-08-31 15:36:52', '2013-08-31 15:36:52')
2845
+ Fixture Insert (0.0ms) INSERT INTO "posts" ("id", "author_id", "title", "body", "type", "created_at", "updated_at") VALUES (11, 2, 'other post by mary', 'hello', 'Post', '2013-08-31 15:36:52', '2013-08-31 15:36:52')
2846
+  (308.7ms) commit transaction
2847
+  (0.1ms) begin transaction
2848
+ Author Load (0.2ms) SELECT "authors".* FROM "authors" WHERE (name like '%av%') AND (("authors"."name" = 'David' AND (name like '%av%') OR "authors"."name" = 'Mary' AND (name like '%av%')))
2849
+  (0.0ms) rollback transaction
2850
+  (0.1ms) begin transaction
2851
+  (0.0ms) rollback transaction
2852
+  (0.0ms) begin transaction
2853
+  (0.0ms) rollback transaction
2854
+  (0.0ms) begin transaction
2855
+ Author Load (0.1ms) SELECT "authors".* FROM "authors" INNER JOIN "posts" ON "posts"."author_id" = "authors"."id" WHERE (("posts"."title" = 'Welcome to the weblog' OR "posts"."title" = 'eager loading with OR''d conditions'))
2856
+ SQL (0.1ms) SELECT "authors"."id" AS t0_r0, "authors"."name" AS t0_r1, "authors"."created_at" AS t0_r2, "authors"."updated_at" AS t0_r3, "posts"."id" AS t1_r0, "posts"."title" AS t1_r1, "posts"."body" AS t1_r2, "posts"."author_id" AS t1_r3, "posts"."type" AS t1_r4, "posts"."created_at" AS t1_r5, "posts"."updated_at" AS t1_r6 FROM "authors" LEFT OUTER JOIN "posts" ON "posts"."author_id" = "authors"."id" WHERE (("posts"."title" = 'Welcome to the weblog' OR "posts"."title" = 'eager loading with OR''d conditions'))
2857
+  (0.0ms) rollback transaction
2858
+  (0.0ms) begin transaction
2859
+ Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE (("authors"."name" = 'David' OR "authors"."name" = 'Mary'))
2860
+ Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE (("authors"."name" = 'David' OR (name = 'Mary')))
2861
+ Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE ((("authors"."name" = 'David' OR (name = 'Mary')) OR "authors"."name" = 'Bob'))
2862
+ Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE ((("authors"."name" = 'David' OR (name = 'Mary')) OR "authors"."name" = 'Bob' AND "authors"."id" = 3))
2863
+ Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE (name IS NOT 'Mary') AND (("authors"."name" = 'David' OR (name IS NOT 'Mary') AND (name = 'Mary')))
2864
+  (0.0ms) rollback transaction
2865
+  (0.0ms) begin transaction
2866
+ Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."name" = 'David' LIMIT 1
2867
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."author_id" = 1 AND (("posts"."author_id" = 1 AND "posts"."body" = 'Such a lovely day' OR "posts"."author_id" = 1 AND "posts"."type" = 'SpecialPost'))
2868
+  (0.0ms) rollback transaction
2869
+  (0.0ms) begin transaction
2870
+ Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE (NOT (("authors"."name" = 'David' OR "authors"."name" = 'Mary')))
2871
+  (0.0ms) rollback transaction
2872
+  (0.0ms) begin transaction
2873
+ Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE "authors"."name" = 'David' LIMIT 1
2874
+ Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."author_id" = 1 AND (NOT (("posts"."author_id" = 1 AND "posts"."body" = 'Such a lovely day' OR "posts"."author_id" = 1 AND "posts"."type" = 'SpecialPost')))
2875
+  (0.0ms) rollback transaction
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,28 @@
1
+ == README
2
+
3
+ This README would normally document whatever steps are necessary to get the
4
+ application up and running.
5
+
6
+ Things you may want to cover:
7
+
8
+ * Ruby version
9
+
10
+ * System dependencies
11
+
12
+ * Configuration
13
+
14
+ * Database creation
15
+
16
+ * Database initialization
17
+
18
+ * How to run the test suite
19
+
20
+ * Services (job queues, cache servers, search engines, etc.)
21
+
22
+ * Deployment instructions
23
+
24
+ * ...
25
+
26
+
27
+ Please feel free to use a different markup language if you do not plan to run
28
+ <tt>rake doc:app</tt>.
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require File.expand_path('../config/application', __FILE__)
5
+
6
+ Dummy::Application.load_tasks
@@ -0,0 +1,13 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file.
9
+ //
10
+ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require_tree .
@@ -0,0 +1,13 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
9
+ * compiled file, but it's generally better to create a new file per style scope.
10
+ *
11
+ *= require_self
12
+ *= require_tree .
13
+ */
@@ -0,0 +1,5 @@
1
+ class ApplicationController < ActionController::Base
2
+ # Prevent CSRF attacks by raising an exception.
3
+ # For APIs, you may want to use :null_session instead.
4
+ protect_from_forgery with: :exception
5
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -0,0 +1,3 @@
1
+ class Author < ActiveRecord::Base
2
+ has_many :posts
3
+ end
@@ -0,0 +1,3 @@
1
+ class Post < ActiveRecord::Base
2
+ belongs_to :author
3
+ end
@@ -0,0 +1,2 @@
1
+ class SpecialPost < Post
2
+ end
@@ -0,0 +1,2 @@
1
+ class StiPost < Post
2
+ end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true %>
6
+ <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby19
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby19
2
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby19
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
@@ -0,0 +1,23 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ Bundler.require(*Rails.groups)
6
+ require "activerecord_any_of"
7
+
8
+ module Dummy
9
+ class Application < Rails::Application
10
+ # Settings in config/environments/* take precedence over those specified here.
11
+ # Application configuration should go into files in config/initializers
12
+ # -- all .rb files in that directory are automatically loaded.
13
+
14
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
15
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
16
+ # config.time_zone = 'Central Time (US & Canada)'
17
+
18
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
19
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
20
+ # config.i18n.default_locale = :de
21
+ end
22
+ end
23
+
@@ -0,0 +1,5 @@
1
+ # Set up gems listed in the Gemfile.
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
3
+
4
+ require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
5
+ $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
@@ -0,0 +1,25 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
6
+ development:
7
+ adapter: sqlite3
8
+ database: db/development.sqlite3
9
+ pool: 5
10
+ timeout: 5000
11
+
12
+ # Warning: The database defined as "test" will be erased and
13
+ # re-generated from your development database when you run "rake".
14
+ # Do not set this db to the same as development or production.
15
+ test:
16
+ adapter: sqlite3
17
+ database: db/test.sqlite3
18
+ pool: 5
19
+ timeout: 5000
20
+
21
+ production:
22
+ adapter: sqlite3
23
+ database: db/production.sqlite3
24
+ pool: 5
25
+ timeout: 5000
@@ -0,0 +1,5 @@
1
+ # Load the Rails application.
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the Rails application.
5
+ Dummy::Application.initialize!
@@ -0,0 +1,29 @@
1
+ Dummy::Application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # In the development environment your application's code is reloaded on
5
+ # every request. This slows down response time but is perfect for development
6
+ # since you don't have to restart the web server when you make code changes.
7
+ config.cache_classes = false
8
+
9
+ # Do not eager load code on boot.
10
+ config.eager_load = false
11
+
12
+ # Show full error reports and disable caching.
13
+ config.consider_all_requests_local = true
14
+ config.action_controller.perform_caching = false
15
+
16
+ # Don't care if the mailer can't send.
17
+ config.action_mailer.raise_delivery_errors = false
18
+
19
+ # Print deprecation notices to the Rails logger.
20
+ config.active_support.deprecation = :log
21
+
22
+ # Raise an error on page load if there are pending migrations
23
+ config.active_record.migration_error = :page_load
24
+
25
+ # Debug mode disables concatenation and preprocessing of assets.
26
+ # This option may cause significant delays in view rendering with a large
27
+ # number of complex assets.
28
+ config.assets.debug = true
29
+ end