page_parts 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +6 -0
- data/lib/page_parts/active_record_extension.rb +16 -11
- data/lib/page_parts/version.rb +1 -1
- data/lib/page_parts.rb +1 -2
- data/test/dummy/app/models/post.rb +5 -0
- data/test/dummy/db/migrate/20120124093705_create_posts.rb +9 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +359 -0
- data/test/dummy/test/fixtures/posts.yml +7 -0
- data/test/dummy/test/unit/post_test.rb +7 -0
- data/test/models/post_test.rb +51 -0
- metadata +18 -8
data/README.rdoc
CHANGED
@@ -22,6 +22,12 @@ Enable page parts in your model
|
|
22
22
|
@category.content = "Some text"
|
23
23
|
@category.sidebar = "Sidebar text"
|
24
24
|
@category.save
|
25
|
+
|
26
|
+
With suffixes:
|
27
|
+
|
28
|
+
page_parts :main, :left, :sidebar, :suffix => [:ru, :en, :uk]
|
29
|
+
|
30
|
+
Generates main_ru, main_en, main_uk, left_ru ...
|
25
31
|
|
26
32
|
== Test
|
27
33
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'active_support/concern'
|
2
|
+
|
1
3
|
module PageParts
|
2
4
|
module ActiveRecordExtension
|
3
5
|
extend ActiveSupport::Concern
|
@@ -15,21 +17,24 @@ module PageParts
|
|
15
17
|
## PageParts
|
16
18
|
# Enable page parts in your model:
|
17
19
|
#
|
18
|
-
# page_parts :main, :left, :sidebar
|
20
|
+
# page_parts :main, :left, :sidebar, :suffix => [:ru, :en, :uk]
|
19
21
|
#
|
20
22
|
def page_parts(*args)
|
21
|
-
options = args.extract_options!
|
22
|
-
|
23
|
-
self.page_parts_definitions[:keys] += args.map(&:to_s)
|
23
|
+
options = { :suffix => [nil] }.merge(args.extract_options!)
|
24
24
|
|
25
25
|
args.each do |attr_name|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
26
|
+
Array.wrap(options[:suffix]).each do |suffix|
|
27
|
+
method_name = [attr_name, suffix].compact.map(&:to_s).join('_')
|
28
|
+
self.page_parts_definitions[:keys] << method_name
|
29
|
+
|
30
|
+
define_method(method_name) do
|
31
|
+
page_part(method_name).try(:content)
|
32
|
+
end
|
33
|
+
|
34
|
+
define_method("#{method_name}=") do |value|
|
35
|
+
record = page_part(method_name)
|
36
|
+
record.content = value
|
37
|
+
end
|
33
38
|
end
|
34
39
|
end
|
35
40
|
end
|
data/lib/page_parts/version.rb
CHANGED
data/lib/page_parts.rb
CHANGED
data/test/dummy/db/test.sqlite3
CHANGED
Binary file
|
data/test/dummy/log/test.log
CHANGED
@@ -423,3 +423,362 @@ Migrating to CreateCategories (20111226131910)
|
|
423
423
|
[1m[35mSQL (0.3ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", nil], ["created_at", Mon, 26 Dec 2011 14:20:13 UTC +00:00], ["key", "test"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Mon, 26 Dec 2011 14:20:13 UTC +00:00]]
|
424
424
|
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
425
425
|
[1m[35m (0.1ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'test' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" = 1) LIMIT 1
|
426
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
427
|
+
Migrating to CreatePageParts (20111226144515)
|
428
|
+
[1m[35m (0.2ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
429
|
+
Migrating to CreateCategories (20111226131910)
|
430
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
431
|
+
[1m[35m (0.3ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'somekey' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" = 1) LIMIT 1
|
432
|
+
[1m[36mSQL (18.5ms)[0m [1mINSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 24 Jan 2012 09:31:25 UTC +00:00], ["key", "somekey"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:31:25 UTC +00:00]]
|
433
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
434
|
+
[1m[36m (0.2ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = '' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" = 1) LIMIT 1[0m
|
435
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
436
|
+
[1m[36mSQL (0.6ms)[0m [1mINSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 24 Jan 2012 09:31:25 UTC +00:00], ["key", "test"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:31:25 UTC +00:00]]
|
437
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
438
|
+
[1m[36m (0.2ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'test' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" = 1) LIMIT 1[0m
|
439
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
440
|
+
Migrating to CreatePageParts (20111226144515)
|
441
|
+
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
442
|
+
Migrating to CreateCategories (20111226131910)
|
443
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
444
|
+
[1m[35m (0.2ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'somekey' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" = 1) LIMIT 1
|
445
|
+
[1m[36mSQL (1.3ms)[0m [1mINSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 24 Jan 2012 09:32:27 UTC +00:00], ["key", "somekey"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:32:27 UTC +00:00]]
|
446
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
447
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = '' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" = 1) LIMIT 1[0m
|
448
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
449
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 24 Jan 2012 09:32:27 UTC +00:00], ["key", "test"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:32:27 UTC +00:00]]
|
450
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
451
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'test' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" = 1) LIMIT 1[0m
|
452
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
453
|
+
Migrating to CreatePageParts (20111226144515)
|
454
|
+
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
455
|
+
Migrating to CreateCategories (20111226131910)
|
456
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
457
|
+
[1m[35m (0.2ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'somekey' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" = 1) LIMIT 1
|
458
|
+
[1m[36mSQL (1.3ms)[0m [1mINSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 24 Jan 2012 09:32:40 UTC +00:00], ["key", "somekey"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:32:40 UTC +00:00]]
|
459
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
460
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = '' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" = 1) LIMIT 1[0m
|
461
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
462
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 24 Jan 2012 09:32:40 UTC +00:00], ["key", "test"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:32:40 UTC +00:00]]
|
463
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
464
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'test' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" = 1) LIMIT 1[0m
|
465
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
466
|
+
Migrating to CreatePageParts (20111226144515)
|
467
|
+
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
468
|
+
Migrating to CreateCategories (20111226131910)
|
469
|
+
[1m[36mPagePart Load (0.3ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Category' AND "page_parts"."key" = 'sidebar' LIMIT 1[0m
|
470
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Category' AND "page_parts"."key" = 'content' LIMIT 1
|
471
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
472
|
+
[1m[35m (0.2ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'sidebar' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" IS NULL) LIMIT 1
|
473
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'content' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" IS NULL) LIMIT 1[0m
|
474
|
+
[1m[35mSQL (22.8ms)[0m INSERT INTO "categories" ("created_at", "title", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 24 Jan 2012 09:33:11 UTC +00:00], ["title", "Test category"], ["updated_at", Tue, 24 Jan 2012 09:33:11 UTC +00:00]]
|
475
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["content", "Sidebar"], ["created_at", Tue, 24 Jan 2012 09:33:11 UTC +00:00], ["key", "sidebar"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:33:11 UTC +00:00]]
|
476
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", "Main"], ["created_at", Tue, 24 Jan 2012 09:33:11 UTC +00:00], ["key", "content"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:33:11 UTC +00:00]]
|
477
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
478
|
+
[1m[35mCategory Load (0.1ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 1]]
|
479
|
+
[1m[36mPagePart Load (0.1ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Category' AND "page_parts"."key" = 'sidebar' LIMIT 1[0m
|
480
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Category' AND "page_parts"."key" = 'content' LIMIT 1
|
481
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "page_parts" [0m
|
482
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
483
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'sidebar' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" IS NULL) LIMIT 1[0m
|
484
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'content' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" IS NULL) LIMIT 1
|
485
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "categories" ("created_at", "title", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Tue, 24 Jan 2012 09:33:11 UTC +00:00], ["title", "Test category"], ["updated_at", Tue, 24 Jan 2012 09:33:11 UTC +00:00]]
|
486
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", "Sidebar content"], ["created_at", Tue, 24 Jan 2012 09:33:11 UTC +00:00], ["key", "sidebar"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:33:11 UTC +00:00]]
|
487
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 24 Jan 2012 09:33:11 UTC +00:00], ["key", "content"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:33:11 UTC +00:00]]
|
488
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
489
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "page_parts" [0m
|
490
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
491
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'somekey' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" = 1) LIMIT 1[0m
|
492
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", nil], ["created_at", Tue, 24 Jan 2012 09:33:11 UTC +00:00], ["key", "somekey"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:33:11 UTC +00:00]]
|
493
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
494
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = '' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" = 1) LIMIT 1
|
495
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
496
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", nil], ["created_at", Tue, 24 Jan 2012 09:33:11 UTC +00:00], ["key", "test"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:33:11 UTC +00:00]]
|
497
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
498
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'test' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" = 1) LIMIT 1
|
499
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
500
|
+
Migrating to CreatePageParts (20111226144515)
|
501
|
+
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
502
|
+
Migrating to CreateCategories (20111226131910)
|
503
|
+
[1m[36mPagePart Load (0.2ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Category' AND "page_parts"."key" = 'sidebar' LIMIT 1[0m
|
504
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Category' AND "page_parts"."key" = 'content' LIMIT 1
|
505
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
506
|
+
[1m[35m (0.2ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'sidebar' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" IS NULL) LIMIT 1
|
507
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'content' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" IS NULL) LIMIT 1[0m
|
508
|
+
[1m[35mSQL (22.6ms)[0m INSERT INTO "categories" ("created_at", "title", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 24 Jan 2012 09:33:31 UTC +00:00], ["title", "Test category"], ["updated_at", Tue, 24 Jan 2012 09:33:31 UTC +00:00]]
|
509
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["content", "Sidebar"], ["created_at", Tue, 24 Jan 2012 09:33:31 UTC +00:00], ["key", "sidebar"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:33:31 UTC +00:00]]
|
510
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", "Main"], ["created_at", Tue, 24 Jan 2012 09:33:31 UTC +00:00], ["key", "content"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:33:31 UTC +00:00]]
|
511
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
512
|
+
[1m[35mCategory Load (0.1ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 1]]
|
513
|
+
[1m[36mPagePart Load (0.1ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Category' AND "page_parts"."key" = 'sidebar' LIMIT 1[0m
|
514
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Category' AND "page_parts"."key" = 'content' LIMIT 1
|
515
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "page_parts" [0m
|
516
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
517
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'sidebar' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" IS NULL) LIMIT 1[0m
|
518
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'content' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" IS NULL) LIMIT 1
|
519
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "categories" ("created_at", "title", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Tue, 24 Jan 2012 09:33:31 UTC +00:00], ["title", "Test category"], ["updated_at", Tue, 24 Jan 2012 09:33:31 UTC +00:00]]
|
520
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", "Sidebar content"], ["created_at", Tue, 24 Jan 2012 09:33:31 UTC +00:00], ["key", "sidebar"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:33:31 UTC +00:00]]
|
521
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 24 Jan 2012 09:33:31 UTC +00:00], ["key", "content"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:33:31 UTC +00:00]]
|
522
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
523
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "page_parts" [0m
|
524
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
525
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'somekey' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" = 1) LIMIT 1[0m
|
526
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", nil], ["created_at", Tue, 24 Jan 2012 09:33:31 UTC +00:00], ["key", "somekey"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:33:31 UTC +00:00]]
|
527
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
528
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = '' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" = 1) LIMIT 1
|
529
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
530
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", nil], ["created_at", Tue, 24 Jan 2012 09:33:31 UTC +00:00], ["key", "test"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:33:31 UTC +00:00]]
|
531
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
532
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'test' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" = 1) LIMIT 1
|
533
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
534
|
+
Migrating to CreatePageParts (20111226144515)
|
535
|
+
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
536
|
+
Migrating to CreateCategories (20111226131910)
|
537
|
+
Migrating to CreatePosts (20120124093705)
|
538
|
+
[1m[36m (0.0ms)[0m [1mselect sqlite_version(*)[0m
|
539
|
+
[1m[35m (0.4ms)[0m CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "is_visible" boolean, "created_at" datetime, "updated_at" datetime)
|
540
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20120124093705')[0m
|
541
|
+
[1m[35mPagePart Load (0.2ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Category' AND "page_parts"."key" = 'sidebar' LIMIT 1
|
542
|
+
[1m[36mPagePart Load (0.1ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Category' AND "page_parts"."key" = 'content' LIMIT 1[0m
|
543
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
544
|
+
[1m[36m (0.2ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'sidebar' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" IS NULL) LIMIT 1[0m
|
545
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'content' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" IS NULL) LIMIT 1
|
546
|
+
[1m[36mSQL (1.1ms)[0m [1mINSERT INTO "categories" ("created_at", "title", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Tue, 24 Jan 2012 09:42:27 UTC +00:00], ["title", "Test category"], ["updated_at", Tue, 24 Jan 2012 09:42:27 UTC +00:00]]
|
547
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", "Sidebar"], ["created_at", Tue, 24 Jan 2012 09:42:27 UTC +00:00], ["key", "sidebar"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:42:27 UTC +00:00]]
|
548
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["content", "Main"], ["created_at", Tue, 24 Jan 2012 09:42:27 UTC +00:00], ["key", "content"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:42:27 UTC +00:00]]
|
549
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
550
|
+
[1m[36mCategory Load (0.1ms)[0m [1mSELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1[0m [["id", 1]]
|
551
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Category' AND "page_parts"."key" = 'sidebar' LIMIT 1
|
552
|
+
[1m[36mPagePart Load (0.1ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Category' AND "page_parts"."key" = 'content' LIMIT 1[0m
|
553
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "page_parts"
|
554
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
555
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'sidebar' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" IS NULL) LIMIT 1
|
556
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'content' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" IS NULL) LIMIT 1[0m
|
557
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "categories" ("created_at", "title", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 24 Jan 2012 09:42:27 UTC +00:00], ["title", "Test category"], ["updated_at", Tue, 24 Jan 2012 09:42:27 UTC +00:00]]
|
558
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["content", "Sidebar content"], ["created_at", Tue, 24 Jan 2012 09:42:27 UTC +00:00], ["key", "sidebar"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:42:27 UTC +00:00]]
|
559
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", nil], ["created_at", Tue, 24 Jan 2012 09:42:27 UTC +00:00], ["key", "content"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:42:27 UTC +00:00]]
|
560
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
561
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "page_parts"
|
562
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
563
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'somekey' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" = 1) LIMIT 1
|
564
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 24 Jan 2012 09:42:27 UTC +00:00], ["key", "somekey"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:42:27 UTC +00:00]]
|
565
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
566
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = '' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" = 1) LIMIT 1[0m
|
567
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
568
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 24 Jan 2012 09:42:27 UTC +00:00], ["key", "test"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:42:27 UTC +00:00]]
|
569
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
570
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'test' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" = 1) LIMIT 1[0m
|
571
|
+
[1m[36m (0.2ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
572
|
+
Migrating to CreatePageParts (20111226144515)
|
573
|
+
[1m[35m (0.2ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
574
|
+
Migrating to CreateCategories (20111226131910)
|
575
|
+
Migrating to CreatePosts (20120124093705)
|
576
|
+
[1m[36mPagePart Load (0.2ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Category' AND "page_parts"."key" = 'sidebar' LIMIT 1[0m
|
577
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Category' AND "page_parts"."key" = 'content' LIMIT 1
|
578
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
579
|
+
[1m[35m (0.2ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'sidebar' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" IS NULL) LIMIT 1
|
580
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'content' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" IS NULL) LIMIT 1[0m
|
581
|
+
[1m[35mSQL (1.3ms)[0m INSERT INTO "categories" ("created_at", "title", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 24 Jan 2012 09:43:40 UTC +00:00], ["title", "Test category"], ["updated_at", Tue, 24 Jan 2012 09:43:40 UTC +00:00]]
|
582
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["content", "Sidebar"], ["created_at", Tue, 24 Jan 2012 09:43:40 UTC +00:00], ["key", "sidebar"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:43:40 UTC +00:00]]
|
583
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", "Main"], ["created_at", Tue, 24 Jan 2012 09:43:40 UTC +00:00], ["key", "content"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:43:40 UTC +00:00]]
|
584
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
585
|
+
[1m[35mCategory Load (0.1ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 1]]
|
586
|
+
[1m[36mPagePart Load (0.1ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Category' AND "page_parts"."key" = 'sidebar' LIMIT 1[0m
|
587
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Category' AND "page_parts"."key" = 'content' LIMIT 1
|
588
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "page_parts" [0m
|
589
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
590
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'sidebar' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" IS NULL) LIMIT 1[0m
|
591
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'content' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" IS NULL) LIMIT 1
|
592
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "categories" ("created_at", "title", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Tue, 24 Jan 2012 09:43:40 UTC +00:00], ["title", "Test category"], ["updated_at", Tue, 24 Jan 2012 09:43:40 UTC +00:00]]
|
593
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", "Sidebar content"], ["created_at", Tue, 24 Jan 2012 09:43:40 UTC +00:00], ["key", "sidebar"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:43:40 UTC +00:00]]
|
594
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 24 Jan 2012 09:43:40 UTC +00:00], ["key", "content"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:43:40 UTC +00:00]]
|
595
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
596
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "page_parts" [0m
|
597
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
598
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'somekey' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" = 1) LIMIT 1[0m
|
599
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", nil], ["created_at", Tue, 24 Jan 2012 09:43:40 UTC +00:00], ["key", "somekey"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:43:40 UTC +00:00]]
|
600
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
601
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = '' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" = 1) LIMIT 1
|
602
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
603
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", nil], ["created_at", Tue, 24 Jan 2012 09:43:40 UTC +00:00], ["key", "test"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:43:40 UTC +00:00]]
|
604
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
605
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'test' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" = 1) LIMIT 1
|
606
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
607
|
+
Migrating to CreatePageParts (20111226144515)
|
608
|
+
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
609
|
+
Migrating to CreateCategories (20111226131910)
|
610
|
+
Migrating to CreatePosts (20120124093705)
|
611
|
+
[1m[36mPagePart Load (0.2ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Category' AND "page_parts"."key" = 'sidebar' LIMIT 1[0m
|
612
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Category' AND "page_parts"."key" = 'content' LIMIT 1
|
613
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
614
|
+
[1m[35m (0.2ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'sidebar' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" IS NULL) LIMIT 1
|
615
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'content' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" IS NULL) LIMIT 1[0m
|
616
|
+
[1m[35mSQL (1.2ms)[0m INSERT INTO "categories" ("created_at", "title", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 24 Jan 2012 09:44:52 UTC +00:00], ["title", "Test category"], ["updated_at", Tue, 24 Jan 2012 09:44:52 UTC +00:00]]
|
617
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["content", "Sidebar"], ["created_at", Tue, 24 Jan 2012 09:44:52 UTC +00:00], ["key", "sidebar"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:44:52 UTC +00:00]]
|
618
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", "Main"], ["created_at", Tue, 24 Jan 2012 09:44:52 UTC +00:00], ["key", "content"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:44:52 UTC +00:00]]
|
619
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
620
|
+
[1m[35mCategory Load (0.1ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 1]]
|
621
|
+
[1m[36mPagePart Load (0.1ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Category' AND "page_parts"."key" = 'sidebar' LIMIT 1[0m
|
622
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Category' AND "page_parts"."key" = 'content' LIMIT 1
|
623
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "page_parts" [0m
|
624
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
625
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'sidebar' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" IS NULL) LIMIT 1[0m
|
626
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'content' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" IS NULL) LIMIT 1
|
627
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "categories" ("created_at", "title", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Tue, 24 Jan 2012 09:44:52 UTC +00:00], ["title", "Test category"], ["updated_at", Tue, 24 Jan 2012 09:44:52 UTC +00:00]]
|
628
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", "Sidebar content"], ["created_at", Tue, 24 Jan 2012 09:44:52 UTC +00:00], ["key", "sidebar"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:44:52 UTC +00:00]]
|
629
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 24 Jan 2012 09:44:52 UTC +00:00], ["key", "content"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:44:52 UTC +00:00]]
|
630
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
631
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "page_parts" [0m
|
632
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
633
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'somekey' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" = 1) LIMIT 1[0m
|
634
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", nil], ["created_at", Tue, 24 Jan 2012 09:44:52 UTC +00:00], ["key", "somekey"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:44:52 UTC +00:00]]
|
635
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
636
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = '' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" = 1) LIMIT 1
|
637
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
638
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", nil], ["created_at", Tue, 24 Jan 2012 09:44:52 UTC +00:00], ["key", "test"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:44:52 UTC +00:00]]
|
639
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
640
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'test' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" = 1) LIMIT 1
|
641
|
+
[1m[36mPagePart Load (0.1ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Post' AND "page_parts"."key" = 'title_ru' LIMIT 1[0m
|
642
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Post' AND "page_parts"."key" = 'content_ru' LIMIT 1
|
643
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
644
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'title_ru' AND "page_parts"."partable_type" = 'Post' AND "page_parts"."partable_id" IS NULL) LIMIT 1
|
645
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'content_ru' AND "page_parts"."partable_type" = 'Post' AND "page_parts"."partable_id" IS NULL) LIMIT 1[0m
|
646
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "posts" ("created_at", "is_visible", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 24 Jan 2012 09:44:52 UTC +00:00], ["is_visible", true], ["updated_at", Tue, 24 Jan 2012 09:44:52 UTC +00:00]]
|
647
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["content", "Sidebar"], ["created_at", Tue, 24 Jan 2012 09:44:52 UTC +00:00], ["key", "title_ru"], ["partable_id", 1], ["partable_type", "Post"], ["updated_at", Tue, 24 Jan 2012 09:44:52 UTC +00:00]]
|
648
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", "Main"], ["created_at", Tue, 24 Jan 2012 09:44:52 UTC +00:00], ["key", "content_ru"], ["partable_id", 1], ["partable_type", "Post"], ["updated_at", Tue, 24 Jan 2012 09:44:52 UTC +00:00]]
|
649
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
650
|
+
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]]
|
651
|
+
[1m[36mPagePart Load (0.1ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Post' AND "page_parts"."key" = 'title_ru' LIMIT 1[0m
|
652
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Post' AND "page_parts"."key" = 'title_en' LIMIT 1
|
653
|
+
[1m[36mPagePart Load (0.1ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Post' AND "page_parts"."key" = 'content_ru' LIMIT 1[0m
|
654
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "page_parts"
|
655
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
656
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'title_ru' AND "page_parts"."partable_type" = 'Post' AND "page_parts"."partable_id" IS NULL) LIMIT 1
|
657
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'title_en' AND "page_parts"."partable_type" = 'Post' AND "page_parts"."partable_id" IS NULL) LIMIT 1[0m
|
658
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'content_ru' AND "page_parts"."partable_type" = 'Post' AND "page_parts"."partable_id" IS NULL) LIMIT 1
|
659
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "posts" ("created_at", "is_visible", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Tue, 24 Jan 2012 09:44:52 UTC +00:00], ["is_visible", true], ["updated_at", Tue, 24 Jan 2012 09:44:52 UTC +00:00]]
|
660
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", "Title ru"], ["created_at", Tue, 24 Jan 2012 09:44:52 UTC +00:00], ["key", "title_ru"], ["partable_id", 1], ["partable_type", "Post"], ["updated_at", Tue, 24 Jan 2012 09:44:52 UTC +00:00]]
|
661
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["content", "Title en"], ["created_at", Tue, 24 Jan 2012 09:44:52 UTC +00:00], ["key", "title_en"], ["partable_id", 1], ["partable_type", "Post"], ["updated_at", Tue, 24 Jan 2012 09:44:52 UTC +00:00]]
|
662
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", nil], ["created_at", Tue, 24 Jan 2012 09:44:52 UTC +00:00], ["key", "content_ru"], ["partable_id", 1], ["partable_type", "Post"], ["updated_at", Tue, 24 Jan 2012 09:44:52 UTC +00:00]]
|
663
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
664
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "page_parts"
|
665
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
666
|
+
Migrating to CreatePageParts (20111226144515)
|
667
|
+
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
668
|
+
Migrating to CreateCategories (20111226131910)
|
669
|
+
Migrating to CreatePosts (20120124093705)
|
670
|
+
[1m[36mPagePart Load (0.2ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Category' AND "page_parts"."key" = 'sidebar' LIMIT 1[0m
|
671
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Category' AND "page_parts"."key" = 'content' LIMIT 1
|
672
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
673
|
+
[1m[35m (0.2ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'sidebar' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" IS NULL) LIMIT 1
|
674
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'content' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" IS NULL) LIMIT 1[0m
|
675
|
+
[1m[35mSQL (1.2ms)[0m INSERT INTO "categories" ("created_at", "title", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 24 Jan 2012 09:45:04 UTC +00:00], ["title", "Test category"], ["updated_at", Tue, 24 Jan 2012 09:45:04 UTC +00:00]]
|
676
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["content", "Sidebar"], ["created_at", Tue, 24 Jan 2012 09:45:04 UTC +00:00], ["key", "sidebar"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:45:04 UTC +00:00]]
|
677
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", "Main"], ["created_at", Tue, 24 Jan 2012 09:45:04 UTC +00:00], ["key", "content"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:45:04 UTC +00:00]]
|
678
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
679
|
+
[1m[35mCategory Load (0.1ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 1]]
|
680
|
+
[1m[36mPagePart Load (0.1ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Category' AND "page_parts"."key" = 'sidebar' LIMIT 1[0m
|
681
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Category' AND "page_parts"."key" = 'content' LIMIT 1
|
682
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "page_parts" [0m
|
683
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
684
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'sidebar' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" IS NULL) LIMIT 1[0m
|
685
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'content' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" IS NULL) LIMIT 1
|
686
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "categories" ("created_at", "title", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Tue, 24 Jan 2012 09:45:04 UTC +00:00], ["title", "Test category"], ["updated_at", Tue, 24 Jan 2012 09:45:04 UTC +00:00]]
|
687
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", "Sidebar content"], ["created_at", Tue, 24 Jan 2012 09:45:04 UTC +00:00], ["key", "sidebar"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:45:04 UTC +00:00]]
|
688
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 24 Jan 2012 09:45:04 UTC +00:00], ["key", "content"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:45:04 UTC +00:00]]
|
689
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
690
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "page_parts" [0m
|
691
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
692
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'somekey' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" = 1) LIMIT 1[0m
|
693
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", nil], ["created_at", Tue, 24 Jan 2012 09:45:04 UTC +00:00], ["key", "somekey"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:45:04 UTC +00:00]]
|
694
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
695
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = '' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" = 1) LIMIT 1
|
696
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
697
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", nil], ["created_at", Tue, 24 Jan 2012 09:45:04 UTC +00:00], ["key", "test"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:45:04 UTC +00:00]]
|
698
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
699
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'test' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" = 1) LIMIT 1
|
700
|
+
[1m[36mPagePart Load (0.1ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Post' AND "page_parts"."key" = 'title_ru' LIMIT 1[0m
|
701
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Post' AND "page_parts"."key" = 'content_ru' LIMIT 1
|
702
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
703
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'title_ru' AND "page_parts"."partable_type" = 'Post' AND "page_parts"."partable_id" IS NULL) LIMIT 1
|
704
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'content_ru' AND "page_parts"."partable_type" = 'Post' AND "page_parts"."partable_id" IS NULL) LIMIT 1[0m
|
705
|
+
[1m[35mSQL (0.5ms)[0m INSERT INTO "posts" ("created_at", "is_visible", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 24 Jan 2012 09:45:04 UTC +00:00], ["is_visible", true], ["updated_at", Tue, 24 Jan 2012 09:45:04 UTC +00:00]]
|
706
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["content", "Sidebar"], ["created_at", Tue, 24 Jan 2012 09:45:04 UTC +00:00], ["key", "title_ru"], ["partable_id", 1], ["partable_type", "Post"], ["updated_at", Tue, 24 Jan 2012 09:45:04 UTC +00:00]]
|
707
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", "Main"], ["created_at", Tue, 24 Jan 2012 09:45:04 UTC +00:00], ["key", "content_ru"], ["partable_id", 1], ["partable_type", "Post"], ["updated_at", Tue, 24 Jan 2012 09:45:04 UTC +00:00]]
|
708
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
709
|
+
[1m[35mPost Load (0.2ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]]
|
710
|
+
[1m[36mPagePart Load (0.2ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Post' AND "page_parts"."key" = 'title_ru' LIMIT 1[0m
|
711
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Post' AND "page_parts"."key" = 'title_en' LIMIT 1
|
712
|
+
[1m[36mPagePart Load (0.2ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Post' AND "page_parts"."key" = 'content_ru' LIMIT 1[0m
|
713
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "page_parts"
|
714
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
715
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'title_ru' AND "page_parts"."partable_type" = 'Post' AND "page_parts"."partable_id" IS NULL) LIMIT 1
|
716
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'title_en' AND "page_parts"."partable_type" = 'Post' AND "page_parts"."partable_id" IS NULL) LIMIT 1[0m
|
717
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'content_ru' AND "page_parts"."partable_type" = 'Post' AND "page_parts"."partable_id" IS NULL) LIMIT 1
|
718
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "posts" ("created_at", "is_visible", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Tue, 24 Jan 2012 09:45:04 UTC +00:00], ["is_visible", true], ["updated_at", Tue, 24 Jan 2012 09:45:04 UTC +00:00]]
|
719
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", "Title ru"], ["created_at", Tue, 24 Jan 2012 09:45:04 UTC +00:00], ["key", "title_ru"], ["partable_id", 1], ["partable_type", "Post"], ["updated_at", Tue, 24 Jan 2012 09:45:04 UTC +00:00]]
|
720
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["content", "Title en"], ["created_at", Tue, 24 Jan 2012 09:45:04 UTC +00:00], ["key", "title_en"], ["partable_id", 1], ["partable_type", "Post"], ["updated_at", Tue, 24 Jan 2012 09:45:04 UTC +00:00]]
|
721
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", nil], ["created_at", Tue, 24 Jan 2012 09:45:04 UTC +00:00], ["key", "content_ru"], ["partable_id", 1], ["partable_type", "Post"], ["updated_at", Tue, 24 Jan 2012 09:45:04 UTC +00:00]]
|
722
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
723
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "page_parts"
|
724
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
725
|
+
Migrating to CreatePageParts (20111226144515)
|
726
|
+
[1m[35m (0.1ms)[0m SELECT "schema_migrations"."version" FROM "schema_migrations"
|
727
|
+
Migrating to CreateCategories (20111226131910)
|
728
|
+
Migrating to CreatePosts (20120124093705)
|
729
|
+
[1m[36mPagePart Load (0.2ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Category' AND "page_parts"."key" = 'sidebar' LIMIT 1[0m
|
730
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Category' AND "page_parts"."key" = 'content' LIMIT 1
|
731
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
732
|
+
[1m[35m (0.2ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'sidebar' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" IS NULL) LIMIT 1
|
733
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'content' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" IS NULL) LIMIT 1[0m
|
734
|
+
[1m[35mSQL (1.2ms)[0m INSERT INTO "categories" ("created_at", "title", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 24 Jan 2012 09:45:43 UTC +00:00], ["title", "Test category"], ["updated_at", Tue, 24 Jan 2012 09:45:43 UTC +00:00]]
|
735
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["content", "Sidebar"], ["created_at", Tue, 24 Jan 2012 09:45:43 UTC +00:00], ["key", "sidebar"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:45:43 UTC +00:00]]
|
736
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", "Main"], ["created_at", Tue, 24 Jan 2012 09:45:43 UTC +00:00], ["key", "content"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:45:43 UTC +00:00]]
|
737
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
738
|
+
[1m[35mCategory Load (0.1ms)[0m SELECT "categories".* FROM "categories" WHERE "categories"."id" = ? LIMIT 1 [["id", 1]]
|
739
|
+
[1m[36mPagePart Load (0.1ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Category' AND "page_parts"."key" = 'sidebar' LIMIT 1[0m
|
740
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Category' AND "page_parts"."key" = 'content' LIMIT 1
|
741
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "page_parts" [0m
|
742
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
743
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'sidebar' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" IS NULL) LIMIT 1[0m
|
744
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'content' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" IS NULL) LIMIT 1
|
745
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "categories" ("created_at", "title", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Tue, 24 Jan 2012 09:45:43 UTC +00:00], ["title", "Test category"], ["updated_at", Tue, 24 Jan 2012 09:45:43 UTC +00:00]]
|
746
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", "Sidebar content"], ["created_at", Tue, 24 Jan 2012 09:45:43 UTC +00:00], ["key", "sidebar"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:45:43 UTC +00:00]]
|
747
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["content", nil], ["created_at", Tue, 24 Jan 2012 09:45:43 UTC +00:00], ["key", "content"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:45:43 UTC +00:00]]
|
748
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
749
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "page_parts" [0m
|
750
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
751
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'somekey' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" = 1) LIMIT 1[0m
|
752
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", nil], ["created_at", Tue, 24 Jan 2012 09:45:43 UTC +00:00], ["key", "somekey"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:45:43 UTC +00:00]]
|
753
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
754
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = '' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" = 1) LIMIT 1
|
755
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
756
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", nil], ["created_at", Tue, 24 Jan 2012 09:45:43 UTC +00:00], ["key", "test"], ["partable_id", 1], ["partable_type", "Category"], ["updated_at", Tue, 24 Jan 2012 09:45:43 UTC +00:00]]
|
757
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
758
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'test' AND "page_parts"."partable_type" = 'Category' AND "page_parts"."partable_id" = 1) LIMIT 1
|
759
|
+
[1m[36mPagePart Load (0.1ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Post' AND "page_parts"."key" = 'title_ru' LIMIT 1[0m
|
760
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Post' AND "page_parts"."key" = 'content_uk' LIMIT 1
|
761
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
762
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'title_ru' AND "page_parts"."partable_type" = 'Post' AND "page_parts"."partable_id" IS NULL) LIMIT 1
|
763
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'content_uk' AND "page_parts"."partable_type" = 'Post' AND "page_parts"."partable_id" IS NULL) LIMIT 1[0m
|
764
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "posts" ("created_at", "is_visible", "updated_at") VALUES (?, ?, ?) [["created_at", Tue, 24 Jan 2012 09:45:43 UTC +00:00], ["is_visible", true], ["updated_at", Tue, 24 Jan 2012 09:45:43 UTC +00:00]]
|
765
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["content", "Sidebar"], ["created_at", Tue, 24 Jan 2012 09:45:43 UTC +00:00], ["key", "title_ru"], ["partable_id", 1], ["partable_type", "Post"], ["updated_at", Tue, 24 Jan 2012 09:45:43 UTC +00:00]]
|
766
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", "Main"], ["created_at", Tue, 24 Jan 2012 09:45:43 UTC +00:00], ["key", "content_uk"], ["partable_id", 1], ["partable_type", "Post"], ["updated_at", Tue, 24 Jan 2012 09:45:43 UTC +00:00]]
|
767
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
768
|
+
[1m[35mPost Load (0.1ms)[0m SELECT "posts".* FROM "posts" WHERE "posts"."id" = ? LIMIT 1 [["id", 1]]
|
769
|
+
[1m[36mPagePart Load (0.1ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = 1 AND "page_parts"."partable_type" = 'Post' AND "page_parts"."key" = 'content_ru' LIMIT 1[0m
|
770
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" = 1 AND "page_parts"."partable_type" = 'Post' AND "page_parts"."key" = 'content_en' LIMIT 1
|
771
|
+
[1m[36mPagePart Load (0.1ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Post' AND "page_parts"."key" = 'title_ru' LIMIT 1[0m
|
772
|
+
[1m[35mPagePart Load (0.1ms)[0m SELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Post' AND "page_parts"."key" = 'title_en' LIMIT 1
|
773
|
+
[1m[36mPagePart Load (0.1ms)[0m [1mSELECT "page_parts".* FROM "page_parts" WHERE "page_parts"."partable_id" IS NULL AND "page_parts"."partable_type" = 'Post' AND "page_parts"."key" = 'content_ru' LIMIT 1[0m
|
774
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "page_parts"
|
775
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
776
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'title_ru' AND "page_parts"."partable_type" = 'Post' AND "page_parts"."partable_id" IS NULL) LIMIT 1
|
777
|
+
[1m[36m (0.1ms)[0m [1mSELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'title_en' AND "page_parts"."partable_type" = 'Post' AND "page_parts"."partable_id" IS NULL) LIMIT 1[0m
|
778
|
+
[1m[35m (0.1ms)[0m SELECT 1 FROM "page_parts" WHERE ("page_parts"."key" = 'content_ru' AND "page_parts"."partable_type" = 'Post' AND "page_parts"."partable_id" IS NULL) LIMIT 1
|
779
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "posts" ("created_at", "is_visible", "updated_at") VALUES (?, ?, ?)[0m [["created_at", Tue, 24 Jan 2012 09:45:43 UTC +00:00], ["is_visible", true], ["updated_at", Tue, 24 Jan 2012 09:45:43 UTC +00:00]]
|
780
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", "Title ru"], ["created_at", Tue, 24 Jan 2012 09:45:43 UTC +00:00], ["key", "title_ru"], ["partable_id", 1], ["partable_type", "Post"], ["updated_at", Tue, 24 Jan 2012 09:45:43 UTC +00:00]]
|
781
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?)[0m [["content", "Title en"], ["created_at", Tue, 24 Jan 2012 09:45:43 UTC +00:00], ["key", "title_en"], ["partable_id", 1], ["partable_type", "Post"], ["updated_at", Tue, 24 Jan 2012 09:45:43 UTC +00:00]]
|
782
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "page_parts" ("content", "created_at", "key", "partable_id", "partable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content", nil], ["created_at", Tue, 24 Jan 2012 09:45:43 UTC +00:00], ["key", "content_ru"], ["partable_id", 1], ["partable_type", "Post"], ["updated_at", Tue, 24 Jan 2012 09:45:43 UTC +00:00]]
|
783
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
784
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "page_parts"
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class PostTest < ActiveSupport::TestCase
|
4
|
+
|
5
|
+
setup do
|
6
|
+
@post = Post.new :is_visible => true
|
7
|
+
end
|
8
|
+
|
9
|
+
test 'should has page_parts_definitions' do
|
10
|
+
assert Post.respond_to?(:page_parts_definitions)
|
11
|
+
end
|
12
|
+
|
13
|
+
test "should save page parts with new_record" do
|
14
|
+
value_ru = "Title ru"
|
15
|
+
@post.title_ru = value_ru
|
16
|
+
|
17
|
+
value_en = "Title en"
|
18
|
+
@post.title_en = value_en
|
19
|
+
|
20
|
+
assert_equal @post.page_part(:title_ru).content, value_ru
|
21
|
+
assert_equal @post.page_part(:title_en).content, value_en
|
22
|
+
assert_equal @post.page_part(:content_ru).content, nil
|
23
|
+
|
24
|
+
assert_difference('PagePart.count', 3) do
|
25
|
+
@post.save
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
test "should load page parts into record" do
|
30
|
+
@post.title_ru = "Sidebar"
|
31
|
+
@post.content_uk = "Main"
|
32
|
+
@post.save
|
33
|
+
|
34
|
+
@post.reload
|
35
|
+
|
36
|
+
assert_equal @post.title_ru, "Sidebar"
|
37
|
+
assert_equal @post.content_uk, "Main"
|
38
|
+
assert_equal @post.content_ru, nil
|
39
|
+
assert_equal @post.content_en, nil
|
40
|
+
end
|
41
|
+
|
42
|
+
test "should raise error on not registered page part" do
|
43
|
+
assert_raise(NoMethodError) do
|
44
|
+
@post.title
|
45
|
+
end
|
46
|
+
|
47
|
+
assert_raise(NoMethodError) do
|
48
|
+
@post.content
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: page_parts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,22 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2012-01-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
16
|
-
requirement: &
|
16
|
+
requirement: &80855800 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 3.
|
21
|
+
version: 3.0.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *80855800
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: sqlite3
|
27
|
-
requirement: &
|
27
|
+
requirement: &80854830 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *80854830
|
36
36
|
description: Aimbulance CMS
|
37
37
|
email:
|
38
38
|
- galeta.igor@gmail.com
|
@@ -51,6 +51,7 @@ files:
|
|
51
51
|
- Rakefile
|
52
52
|
- README.rdoc
|
53
53
|
- test/models/category_test.rb
|
54
|
+
- test/models/post_test.rb
|
54
55
|
- test/models/page_part_test.rb
|
55
56
|
- test/dummy/public/500.html
|
56
57
|
- test/dummy/public/404.html
|
@@ -59,6 +60,7 @@ files:
|
|
59
60
|
- test/dummy/app/views/layouts/application.html.erb
|
60
61
|
- test/dummy/app/helpers/application_helper.rb
|
61
62
|
- test/dummy/app/models/category.rb
|
63
|
+
- test/dummy/app/models/post.rb
|
62
64
|
- test/dummy/app/assets/stylesheets/application.css
|
63
65
|
- test/dummy/app/assets/javascripts/application.js
|
64
66
|
- test/dummy/app/controllers/application_controller.rb
|
@@ -66,7 +68,9 @@ files:
|
|
66
68
|
- test/dummy/log/development.log
|
67
69
|
- test/dummy/Rakefile
|
68
70
|
- test/dummy/test/unit/category_test.rb
|
71
|
+
- test/dummy/test/unit/post_test.rb
|
69
72
|
- test/dummy/test/fixtures/categories.yml
|
73
|
+
- test/dummy/test/fixtures/posts.yml
|
70
74
|
- test/dummy/script/rails
|
71
75
|
- test/dummy/config/routes.rb
|
72
76
|
- test/dummy/config/environments/production.rb
|
@@ -83,6 +87,7 @@ files:
|
|
83
87
|
- test/dummy/config/initializers/wrap_parameters.rb
|
84
88
|
- test/dummy/config/environment.rb
|
85
89
|
- test/dummy/config/locales/en.yml
|
90
|
+
- test/dummy/db/migrate/20120124093705_create_posts.rb
|
86
91
|
- test/dummy/db/migrate/20111226131910_create_categories.rb
|
87
92
|
- test/dummy/db/test.sqlite3
|
88
93
|
- test/dummy/config.ru
|
@@ -114,6 +119,7 @@ specification_version: 3
|
|
114
119
|
summary: Easy way to setup and use different page parts.
|
115
120
|
test_files:
|
116
121
|
- test/models/category_test.rb
|
122
|
+
- test/models/post_test.rb
|
117
123
|
- test/models/page_part_test.rb
|
118
124
|
- test/dummy/public/500.html
|
119
125
|
- test/dummy/public/404.html
|
@@ -122,6 +128,7 @@ test_files:
|
|
122
128
|
- test/dummy/app/views/layouts/application.html.erb
|
123
129
|
- test/dummy/app/helpers/application_helper.rb
|
124
130
|
- test/dummy/app/models/category.rb
|
131
|
+
- test/dummy/app/models/post.rb
|
125
132
|
- test/dummy/app/assets/stylesheets/application.css
|
126
133
|
- test/dummy/app/assets/javascripts/application.js
|
127
134
|
- test/dummy/app/controllers/application_controller.rb
|
@@ -129,7 +136,9 @@ test_files:
|
|
129
136
|
- test/dummy/log/development.log
|
130
137
|
- test/dummy/Rakefile
|
131
138
|
- test/dummy/test/unit/category_test.rb
|
139
|
+
- test/dummy/test/unit/post_test.rb
|
132
140
|
- test/dummy/test/fixtures/categories.yml
|
141
|
+
- test/dummy/test/fixtures/posts.yml
|
133
142
|
- test/dummy/script/rails
|
134
143
|
- test/dummy/config/routes.rb
|
135
144
|
- test/dummy/config/environments/production.rb
|
@@ -146,6 +155,7 @@ test_files:
|
|
146
155
|
- test/dummy/config/initializers/wrap_parameters.rb
|
147
156
|
- test/dummy/config/environment.rb
|
148
157
|
- test/dummy/config/locales/en.yml
|
158
|
+
- test/dummy/db/migrate/20120124093705_create_posts.rb
|
149
159
|
- test/dummy/db/migrate/20111226131910_create_categories.rb
|
150
160
|
- test/dummy/db/test.sqlite3
|
151
161
|
- test/dummy/config.ru
|