has_moderated 0.0.17 → 0.0.18

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -84,6 +84,44 @@ to discard (destroy) it, call
84
84
 
85
85
  moderation.discard
86
86
 
87
+ == Special data attached to moderations
88
+
89
+ If you need any special data attached to the Moderation model, you can use the moderation_creating hook.
90
+
91
+ === Example for moderation_creating hook
92
+
93
+ For example you have a Comment model, and it is moderated. But your visitors are logged in when they post comments, so you want to add the user ID to the moderation.
94
+
95
+ * first create a migration to add user_id into Moderation
96
+
97
+ rails g migration AddUserIdToModerations user_id:integer
98
+
99
+ * run rake db:migrate
100
+ * in models/comment.rb, add something like this:
101
+
102
+ attr_accessor :moderation_user_id
103
+ moderation_creating do |m|
104
+ m.user_id = self.moderation_user_id
105
+ end
106
+
107
+ This is just one example on how to do it. You need the attr_accessor here because we are going to pass the user ID from the controller. In the hook you have access to the Moderation model just before it is saved, so you can modify it like any other model. Now just set moderation_user_id on the model before you save it:
108
+
109
+ c = Comment.new
110
+ c.moderation_user_id = current_user.id
111
+ c.save
112
+
113
+ == CarrierWave support
114
+
115
+ There is support for CarrierWave uploads to be moderated. You must put this line into the model that has a CarrierWave uploader mounted:
116
+
117
+ include HasModerated::CarrierWave
118
+
119
+ Right now *you must use the field name "photo" for the upload filename* because it is currently hardcoded into this module. If you do this, then moderation for the photo should work correctly.
120
+
121
+ It does not matter if this model has any moderation itself or if you just have an association to it from some other model that is moderated. You must include this module in either case, because it ensures proper serialization of the photo information.
122
+
123
+ If you need some more customization look at this module in lib/has_moderated/carrier_wave.rb and just copy the methods into your model and customize them (with some care when you do this, some methods should be class methods).
124
+
87
125
  == Tests
88
126
 
89
127
  I've tested this project using RSpec. You can find the tests in
@@ -99,7 +137,6 @@ in the root directory.
99
137
  == TODO
100
138
 
101
139
  Amend moderations... Eg if you create a new record and save it, then change something additionally and save again.
102
- Hook for "moderation_creating" where you can add extra information on the moderation
103
140
  == Problems
104
141
 
105
142
  You may encounter problems with models that have some sort of non-serializable attributes. This might be something like file attachments, you'll have to try it to see.
@@ -25,6 +25,8 @@ module HasModerated
25
25
  end
26
26
 
27
27
  def update_associations_from_value rec
28
+ # in case it's empty
29
+ interpreted_value[:associations] ||= {}
28
30
  # loop association types, e.g. :comments
29
31
  interpreted_value[:associations].each_pair do |assoc_name, assoc_records|
30
32
  # read reflections attribute to determine proper class name and primary key
@@ -1,3 +1,3 @@
1
1
  module HasModerated
2
- VERSION = "0.0.17"
2
+ VERSION = "0.0.18"
3
3
  end
@@ -1265,3 +1265,26 @@ Migrating to CreatePhotoHolders (20111004164509)
1265
1265
   (1.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20111003205633')
1266
1266
   (2.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20111003234101')
1267
1267
   (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20111004153147')
1268
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
1269
+  (0.1ms) select sqlite_version(*)
1270
+  (1.7ms) CREATE TABLE "hook_tests" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "foo" varchar(255), "created_at" datetime, "updated_at" datetime) 
1271
+  (1.6ms) CREATE TABLE "moderations" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "moderatable_id" integer, "moderatable_type" varchar(255) NOT NULL, "attr_name" varchar(60) NOT NULL, "attr_value" text NOT NULL, "created_at" datetime, "updated_at" datetime)
1272
+  (1.8ms) CREATE TABLE "photo_holders" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "created_at" datetime, "updated_at" datetime) 
1273
+  (1.3ms) CREATE TABLE "photos" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "photo" varchar(255), "created_at" datetime, "updated_at" datetime, "photo_holder_id" integer)
1274
+  (1.8ms) CREATE TABLE "subtasks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "task_id" integer, "title" varchar(255), "desc" varchar(255), "created_at" datetime, "updated_at" datetime, "task_all_id" integer) 
1275
+  (1.7ms) CREATE TABLE "task_alls" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "value" varchar(255), "created_at" datetime, "updated_at" datetime)
1276
+  (1.7ms) CREATE TABLE "task_photos" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "photo" varchar(255), "task_id" integer, "created_at" datetime, "updated_at" datetime) 
1277
+  (1.5ms) CREATE TABLE "tasks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "desc" varchar(255), "created_at" datetime, "updated_at" datetime)
1278
+  (1.4ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
1279
+  (0.1ms) PRAGMA index_list("schema_migrations")
1280
+  (1.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
1281
+  (0.1ms) SELECT version FROM "schema_migrations"
1282
+  (1.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20111004164509')
1283
+  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20110901013205')
1284
+  (1.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20110901013228')
1285
+  (1.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20110901013618')
1286
+  (1.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20110908025410')
1287
+  (1.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20110908025606')
1288
+  (2.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20111003205633')
1289
+  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20111003234101')
1290
+  (1.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20111004153147')
@@ -23168,3 +23168,429 @@ Migrating to CreatePhotoHolders (20111004164509)
23168
23168
   (0.1ms) SELECT COUNT(*) FROM "subtasks"
23169
23169
  Task Load (0.1ms) SELECT "tasks".* FROM "tasks" LIMIT 1
23170
23170
  Subtask Load (0.1ms) SELECT "subtasks".* FROM "subtasks" WHERE "subtasks"."task_id" = 1 LIMIT 1
23171
+  (0.1ms) SAVEPOINT active_record_1
23172
+ SQL (100.1ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "-"], ["attr_value", " --- \n:main_model: \n created_at: \n title: hello\n updated_at: \n id: \n foo: \n:associations: {}\n\n"], ["created_at", Thu, 06 Oct 2011 00:05:07 UTC +00:00], ["moderatable_id", nil], ["moderatable_type", "HookTest"], ["updated_at", Thu, 06 Oct 2011 00:05:07 UTC +00:00]]
23173
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23174
+ Moderation Load (0.1ms) SELECT "moderations".* FROM "moderations" ORDER BY "moderations"."id" DESC LIMIT 1
23175
+  (0.0ms) SAVEPOINT active_record_1
23176
+ SQL (0.6ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "-"], ["attr_value", " --- \n:main_model: \n created_at: \n title: hello\n updated_at: \n id: \n foo: \n:associations: {}\n\n"], ["created_at", Thu, 06 Oct 2011 00:05:07 UTC +00:00], ["moderatable_id", nil], ["moderatable_type", "HookTest"], ["updated_at", Thu, 06 Oct 2011 00:05:07 UTC +00:00]]
23177
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23178
+ Moderation Load (0.1ms) SELECT "moderations".* FROM "moderations" ORDER BY "moderations"."id" DESC LIMIT 1
23179
+  (0.0ms) SAVEPOINT active_record_1
23180
+ SQL (0.4ms) INSERT INTO "hook_tests" ("created_at", "foo", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 06 Oct 2011 00:05:07 UTC +00:00], ["foo", nil], ["title", "hello"], ["updated_at", Thu, 06 Oct 2011 00:05:07 UTC +00:00]]
23181
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23182
+  (0.0ms) SAVEPOINT active_record_1
23183
+ SQL (0.2ms) DELETE FROM "moderations" WHERE "moderations"."id" = ? [["id", 1]]
23184
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23185
+ HookTest Load (0.1ms) SELECT "hook_tests".* FROM "hook_tests" LIMIT 1
23186
+  (0.0ms) SAVEPOINT active_record_1
23187
+ SQL (0.3ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "title"], ["attr_value", " --- Jojo\n"], ["created_at", Thu, 06 Oct 2011 00:05:07 UTC +00:00], ["moderatable_id", 1], ["moderatable_type", "HookTest"], ["updated_at", Thu, 06 Oct 2011 00:05:07 UTC +00:00]]
23188
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23189
+ Moderation Load (0.1ms) SELECT "moderations".* FROM "moderations" ORDER BY "moderations"."id" DESC LIMIT 1
23190
+ Moderation Load (0.1ms) SELECT "moderations".* FROM "moderations" ORDER BY "moderations"."id" DESC LIMIT 1
23191
+ HookTest Load (0.2ms) SELECT "hook_tests".* FROM "hook_tests" WHERE "hook_tests"."id" = 1 LIMIT 1
23192
+  (0.0ms) SAVEPOINT active_record_1
23193
+  (0.2ms) UPDATE "hook_tests" SET "title" = 'Jojo', "updated_at" = '2011-10-06 00:05:07.871405' WHERE "hook_tests"."id" = 1
23194
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23195
+  (0.0ms) SAVEPOINT active_record_1
23196
+ SQL (0.1ms) DELETE FROM "moderations" WHERE "moderations"."id" = ? [["id", 2]]
23197
+  (0.0ms) RELEASE SAVEPOINT active_record_1
23198
+ HookTest Load (0.1ms) SELECT "hook_tests".* FROM "hook_tests" LIMIT 1
23199
+  (0.1ms) SAVEPOINT active_record_1
23200
+ SQL (0.6ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "-"], ["attr_value", "--- \n:main_model: \n created_at: \n title: Hello\n updated_at: \n id: \n desc: \n:associations: {}\n\n"], ["created_at", Thu, 06 Oct 2011 00:05:07 UTC +00:00], ["moderatable_id", nil], ["moderatable_type", "Task"], ["updated_at", Thu, 06 Oct 2011 00:05:07 UTC +00:00]]
23201
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23202
+ Moderation Load (0.1ms) SELECT "moderations".* FROM "moderations" ORDER BY "moderations"."id" DESC LIMIT 1
23203
+  (0.1ms) SAVEPOINT active_record_1
23204
+ SQL (0.7ms) INSERT INTO "photo_holders" ("created_at", "title", "updated_at") VALUES (?, ?, ?) [["created_at", Thu, 06 Oct 2011 00:05:08 UTC +00:00], ["title", nil], ["updated_at", Thu, 06 Oct 2011 00:05:08 UTC +00:00]]
23205
+ SQL (0.3ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "-"], ["attr_value", "--- \n:main_model: \n photo: \n created_at: \n updated_at: \n id: \n photo_holder_id: 1\n :photo_tmp_file: /Users/apple/rails/has_moderated/test/dummy/public/uploads/tmp/20111006-0205-421-7885/logo_arnes.gif\n:associations: {}\n\n"], ["created_at", Thu, 06 Oct 2011 00:05:08 UTC +00:00], ["moderatable_id", nil], ["moderatable_type", "Photo"], ["updated_at", Thu, 06 Oct 2011 00:05:08 UTC +00:00]]
23206
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23207
+  (0.1ms) SELECT COUNT(*) FROM "photos" 
23208
+ Moderation Load (0.1ms) SELECT "moderations".* FROM "moderations" ORDER BY "moderations"."id" DESC LIMIT 1
23209
+  (0.1ms) SAVEPOINT active_record_1
23210
+ SQL (0.3ms) INSERT INTO "photos" ("created_at", "photo", "photo_holder_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 06 Oct 2011 00:05:08 UTC +00:00], ["photo", "logo_arnes.gif"], ["photo_holder_id", 1], ["updated_at", Thu, 06 Oct 2011 00:05:08 UTC +00:00]]
23211
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23212
+  (0.0ms) SAVEPOINT active_record_1
23213
+ SQL (0.1ms) DELETE FROM "moderations" WHERE "moderations"."id" = ? [["id", 1]]
23214
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23215
+  (0.1ms) SELECT COUNT(*) FROM "photos" 
23216
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" LIMIT 1
23217
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" LIMIT 1
23218
+  (0.1ms) SAVEPOINT active_record_1
23219
+ SQL (0.7ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "-"], ["attr_value", "--- \n:main_model: \n photo: \n created_at: \n updated_at: \n id: \n photo_holder_id: \n :photo_tmp_file: /Users/apple/rails/has_moderated/test/dummy/public/uploads/tmp/20111006-0205-421-2781/logo_arnes.gif\n:associations: {}\n\n"], ["created_at", Thu, 06 Oct 2011 00:05:08 UTC +00:00], ["moderatable_id", nil], ["moderatable_type", "Photo"], ["updated_at", Thu, 06 Oct 2011 00:05:08 UTC +00:00]]
23220
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23221
+  (0.1ms) SELECT COUNT(*) FROM "photos" 
23222
+ Moderation Load (0.1ms) SELECT "moderations".* FROM "moderations" ORDER BY "moderations"."id" DESC LIMIT 1
23223
+  (0.1ms) SAVEPOINT active_record_1
23224
+ SQL (0.3ms) INSERT INTO "photos" ("created_at", "photo", "photo_holder_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 06 Oct 2011 00:05:08 UTC +00:00], ["photo", "logo_arnes.gif"], ["photo_holder_id", nil], ["updated_at", Thu, 06 Oct 2011 00:05:08 UTC +00:00]]
23225
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23226
+  (0.0ms) SAVEPOINT active_record_1
23227
+ SQL (0.1ms) DELETE FROM "moderations" WHERE "moderations"."id" = ? [["id", 1]]
23228
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23229
+  (0.1ms) SELECT COUNT(*) FROM "photos" 
23230
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" LIMIT 1
23231
+  (0.1ms) SAVEPOINT active_record_1
23232
+ SQL (0.6ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "-"], ["attr_value", "--- \n:main_model: \n photo: \n created_at: \n updated_at: \n id: \n photo_holder_id: \n :photo_tmp_file: /Users/apple/rails/has_moderated/test/dummy/public/uploads/tmp/20111006-0205-421-5302/logo_arnes.gif\n:associations: {}\n\n"], ["created_at", Thu, 06 Oct 2011 00:05:08 UTC +00:00], ["moderatable_id", nil], ["moderatable_type", "Photo"], ["updated_at", Thu, 06 Oct 2011 00:05:08 UTC +00:00]]
23233
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23234
+  (0.1ms) SELECT COUNT(*) FROM "photos"
23235
+ Moderation Load (0.1ms) SELECT "moderations".* FROM "moderations" ORDER BY "moderations"."id" DESC LIMIT 1
23236
+  (0.0ms) SAVEPOINT active_record_1
23237
+ SQL (0.1ms) DELETE FROM "moderations" WHERE "moderations"."id" = ? [["id", 1]]
23238
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23239
+  (0.1ms) SELECT COUNT(*) FROM "photos" 
23240
+  (0.0ms) SAVEPOINT active_record_1
23241
+ SQL (0.6ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "-"], ["attr_value", "--- \n:main_model: \n:associations: {}\n\n"], ["created_at", Thu, 06 Oct 2011 00:05:08 UTC +00:00], ["moderatable_id", nil], ["moderatable_type", "Photo"], ["updated_at", Thu, 06 Oct 2011 00:05:08 UTC +00:00]]
23242
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23243
+  (0.1ms) SELECT COUNT(*) FROM "photos" 
23244
+ Moderation Load (0.1ms) SELECT "moderations".* FROM "moderations" ORDER BY "moderations"."id" DESC LIMIT 1
23245
+  (0.0ms) SAVEPOINT active_record_1
23246
+ SQL (0.3ms) INSERT INTO "photos" ("created_at", "photo", "photo_holder_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 06 Oct 2011 00:05:08 UTC +00:00], ["photo", nil], ["photo_holder_id", nil], ["updated_at", Thu, 06 Oct 2011 00:05:08 UTC +00:00]]
23247
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23248
+  (0.0ms) SAVEPOINT active_record_1
23249
+ SQL (0.1ms) DELETE FROM "moderations" WHERE "moderations"."id" = ? [["id", 1]]
23250
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23251
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" LIMIT 1
23252
+  (0.1ms) SAVEPOINT active_record_1
23253
+ SQL (0.4ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "photo_tmp_file"], ["attr_value", "/Users/apple/rails/has_moderated/test/dummy/public/uploads/tmp/20111006-0205-421-6248/logo_arnes.gif"], ["created_at", Thu, 06 Oct 2011 00:05:08 UTC +00:00], ["moderatable_id", 1], ["moderatable_type", "Photo"], ["updated_at", Thu, 06 Oct 2011 00:05:08 UTC +00:00]]
23254
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23255
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" LIMIT 1
23256
+  (0.1ms) SELECT COUNT(*) FROM "moderations"
23257
+ Moderation Load (0.1ms) SELECT "moderations".* FROM "moderations" ORDER BY "moderations"."id" DESC LIMIT 1
23258
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = 1 LIMIT 1
23259
+  (0.1ms) SAVEPOINT active_record_1
23260
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" WHERE "photos"."id" = ? LIMIT 1 [["id", 1]]
23261
+  (0.1ms) UPDATE "photos" SET "photo" = 'logo_arnes.gif', "updated_at" = '2011-10-06 00:05:08.821215' WHERE "photos"."id" = 1
23262
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23263
+  (0.0ms) SAVEPOINT active_record_1
23264
+ SQL (0.1ms) DELETE FROM "moderations" WHERE "moderations"."id" = ? [["id", 2]]
23265
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23266
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" LIMIT 1
23267
+ Photo Load (0.2ms) SELECT "photos".* FROM "photos" LIMIT 1
23268
+ Photo Load (0.1ms) SELECT "photos".* FROM "photos" LIMIT 1
23269
+  (0.1ms) SAVEPOINT active_record_1
23270
+ SQL (0.7ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "-"], ["attr_value", "--- \n:main_model: \n created_at: \n title: Task 1\n updated_at: \n id: \n desc: \n:associations: \n :task_photos: \n - photo: \n task_id: \n created_at: \n updated_at: \n id: \n :photo_tmp_file: /Users/apple/rails/has_moderated/test/dummy/public/uploads/tmp/20111006-0205-421-5289/logo_arnes.gif\n"], ["created_at", Thu, 06 Oct 2011 00:05:08 UTC +00:00], ["moderatable_id", nil], ["moderatable_type", "Task"], ["updated_at", Thu, 06 Oct 2011 00:05:08 UTC +00:00]]
23271
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23272
+  (0.1ms) SELECT COUNT(*) FROM "moderations"
23273
+  (0.1ms) SELECT COUNT(*) FROM "tasks" 
23274
+  (0.1ms) SELECT COUNT(*) FROM "task_photos"
23275
+ Moderation Load (0.1ms) SELECT "moderations".* FROM "moderations" ORDER BY "moderations"."id" DESC LIMIT 1
23276
+  (0.0ms) SAVEPOINT active_record_1
23277
+ SQL (0.3ms) INSERT INTO "tasks" ("created_at", "desc", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 06 Oct 2011 00:05:08 UTC +00:00], ["desc", nil], ["title", "Task 1"], ["updated_at", Thu, 06 Oct 2011 00:05:08 UTC +00:00]]
23278
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23279
+  (0.0ms) SAVEPOINT active_record_1
23280
+ SQL (0.3ms) INSERT INTO "task_photos" ("created_at", "photo", "task_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 06 Oct 2011 00:05:08 UTC +00:00], ["photo", "logo_arnes.gif"], ["task_id", 1], ["updated_at", Thu, 06 Oct 2011 00:05:08 UTC +00:00]]
23281
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23282
+  (0.0ms) SAVEPOINT active_record_1
23283
+ SQL (0.1ms) DELETE FROM "moderations" WHERE "moderations"."id" = ? [["id", 1]]
23284
+  (0.0ms) RELEASE SAVEPOINT active_record_1
23285
+  (0.1ms) SELECT COUNT(*) FROM "tasks" 
23286
+ Task Load (0.1ms) SELECT "tasks".* FROM "tasks" LIMIT 1
23287
+ Task Load (0.1ms) SELECT "tasks".* FROM "tasks" LIMIT 1
23288
+ TaskPhoto Load (0.1ms) SELECT "task_photos".* FROM "task_photos" WHERE "task_photos"."task_id" = 1 LIMIT 1
23289
+  (0.0ms) SAVEPOINT active_record_1
23290
+ SQL (0.6ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "-"], ["attr_value", "--- \n:main_model: \n created_at: \n title: Bye Bye\n updated_at: \n id: \n desc: \n:associations: {}\n\n"], ["created_at", Thu, 06 Oct 2011 00:05:08 UTC +00:00], ["moderatable_id", nil], ["moderatable_type", "Task"], ["updated_at", Thu, 06 Oct 2011 00:05:08 UTC +00:00]]
23291
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23292
+  (0.1ms) SELECT COUNT(*) FROM "tasks"
23293
+  (0.0ms) SELECT COUNT(*) FROM "moderations" 
23294
+  (0.0ms) SAVEPOINT active_record_1
23295
+ SQL (0.6ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "-"], ["attr_value", "--- \n:main_model: \n created_at: \n title: Bye Bye\n updated_at: \n id: \n desc: \n:associations: {}\n\n"], ["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["moderatable_id", nil], ["moderatable_type", "Task"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23296
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23297
+ Moderation Load (0.1ms) SELECT "moderations".* FROM "moderations" ORDER BY "moderations"."id" DESC LIMIT 1
23298
+  (0.0ms) SAVEPOINT active_record_1
23299
+ SQL (0.3ms) INSERT INTO "tasks" ("created_at", "desc", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["desc", nil], ["title", "Bye Bye"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23300
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23301
+  (0.0ms) SAVEPOINT active_record_1
23302
+ SQL (0.1ms) DELETE FROM "moderations" WHERE "moderations"."id" = ? [["id", 1]]
23303
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23304
+  (0.1ms) SELECT COUNT(*) FROM "moderations"
23305
+  (0.0ms) SELECT COUNT(*) FROM "tasks" 
23306
+ Task Load (0.1ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" DESC LIMIT 1
23307
+  (0.0ms) SAVEPOINT active_record_1
23308
+ SQL (0.6ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "-"], ["attr_value", "--- \n:main_model: \n created_at: \n title: Bye Bye\n updated_at: \n id: \n desc: \n:associations: {}\n\n"], ["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["moderatable_id", nil], ["moderatable_type", "Task"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23309
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23310
+ Moderation Load (0.1ms) SELECT "moderations".* FROM "moderations" ORDER BY "moderations"."id" DESC LIMIT 1
23311
+  (0.0ms) SAVEPOINT active_record_1
23312
+ SQL (0.3ms) INSERT INTO "tasks" ("created_at", "desc", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["desc", nil], ["title", "Bye Bye"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23313
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23314
+  (0.0ms) SAVEPOINT active_record_1
23315
+ SQL (0.1ms) DELETE FROM "moderations" WHERE "moderations"."id" = ? [["id", 1]]
23316
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23317
+ Task Load (0.1ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" DESC LIMIT 1
23318
+  (0.0ms) SAVEPOINT active_record_1
23319
+ SQL (0.3ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "title"], ["attr_value", "--- Hollywood Hills\n"], ["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["moderatable_id", 1], ["moderatable_type", "Task"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23320
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23321
+ Task Load (0.1ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" DESC LIMIT 1
23322
+  (0.0ms) SAVEPOINT active_record_1
23323
+ SQL (0.3ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "title"], ["attr_value", "--- Hollywood Hills\n"], ["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["moderatable_id", 1], ["moderatable_type", "Task"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23324
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23325
+ Task Load (0.1ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" DESC LIMIT 1
23326
+  (0.0ms) SAVEPOINT active_record_1
23327
+ SQL (0.3ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "title"], ["attr_value", "--- Hollywood Hills\n"], ["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["moderatable_id", 1], ["moderatable_type", "Task"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23328
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23329
+ Task Load (0.1ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" DESC LIMIT 1
23330
+  (0.0ms) SAVEPOINT active_record_1
23331
+ SQL (0.3ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "title"], ["attr_value", "--- Hollywood Hills\n"], ["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["moderatable_id", 1], ["moderatable_type", "Task"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23332
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23333
+  (0.1ms) SELECT COUNT(*) FROM "moderations" 
23334
+ Task Load (0.1ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" DESC LIMIT 1
23335
+ Moderation Load (0.1ms) SELECT "moderations".* FROM "moderations" ORDER BY "moderations"."id" DESC LIMIT 1
23336
+ Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = 1 LIMIT 1
23337
+  (0.0ms) SAVEPOINT active_record_1
23338
+  (0.1ms) UPDATE "tasks" SET "updated_at" = '2011-10-06 00:05:09.043665', "title" = 'Hollywood Hills' WHERE "tasks"."id" = 1
23339
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23340
+  (0.0ms) SAVEPOINT active_record_1
23341
+ SQL (0.1ms) DELETE FROM "moderations" WHERE "moderations"."id" = ? [["id", 5]]
23342
+  (0.0ms) RELEASE SAVEPOINT active_record_1
23343
+ Task Load (0.1ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" DESC LIMIT 1
23344
+  (0.1ms) SELECT COUNT(*) FROM "tasks"
23345
+  (0.0ms) SAVEPOINT active_record_1
23346
+ SQL (0.6ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "-"], ["attr_value", "--- \n:main_model: \n created_at: \n title: Bye Bye\n updated_at: \n id: \n desc: \n:associations: {}\n\n"], ["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["moderatable_id", nil], ["moderatable_type", "Task"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23347
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23348
+ Moderation Load (0.1ms) SELECT "moderations".* FROM "moderations" ORDER BY "moderations"."id" DESC LIMIT 1
23349
+  (0.0ms) SAVEPOINT active_record_1
23350
+ SQL (0.1ms) DELETE FROM "moderations" WHERE "moderations"."id" = ? [["id", 1]]
23351
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23352
+  (0.1ms) SELECT COUNT(*) FROM "tasks"
23353
+  (0.1ms) SELECT COUNT(*) FROM "moderations" 
23354
+  (0.0ms) SAVEPOINT active_record_1
23355
+ SQL (0.6ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "-"], ["attr_value", "--- \n:main_model: \n created_at: \n title: Bye Bye\n updated_at: \n id: \n desc: \n:associations: {}\n\n"], ["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["moderatable_id", nil], ["moderatable_type", "Task"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23356
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23357
+ Moderation Load (0.1ms) SELECT "moderations".* FROM "moderations" ORDER BY "moderations"."id" DESC LIMIT 1
23358
+  (0.0ms) SAVEPOINT active_record_1
23359
+ SQL (0.3ms) INSERT INTO "tasks" ("created_at", "desc", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["desc", nil], ["title", "Bye Bye"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23360
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23361
+  (0.0ms) SAVEPOINT active_record_1
23362
+ SQL (0.1ms) DELETE FROM "moderations" WHERE "moderations"."id" = ? [["id", 1]]
23363
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23364
+ Task Load (0.1ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" DESC LIMIT 1
23365
+  (0.0ms) SAVEPOINT active_record_1
23366
+ SQL (0.3ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "title"], ["attr_value", "--- Hollywood Hills\n"], ["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["moderatable_id", 1], ["moderatable_type", "Task"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23367
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23368
+ Moderation Load (0.1ms) SELECT "moderations".* FROM "moderations" ORDER BY "moderations"."id" DESC LIMIT 1
23369
+  (0.0ms) SAVEPOINT active_record_1
23370
+ SQL (0.1ms) DELETE FROM "moderations" WHERE "moderations"."id" = ? [["id", 2]]
23371
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23372
+  (0.1ms) SELECT COUNT(*) FROM "tasks"
23373
+ Task Load (0.1ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" DESC LIMIT 1
23374
+  (0.0ms) SELECT COUNT(*) FROM "moderations"
23375
+  (0.1ms) SAVEPOINT active_record_1
23376
+ SQL (0.6ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "-"], ["attr_value", "--- \n:main_model: \n created_at: \n title: Bye Bye\n updated_at: \n id: \n desc: \n:associations: \n :subtasks: \n - created_at: \n task_id: \n title: Hollywood Hills\n updated_at: \n id: \n task_all_id: \n desc: \n"], ["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["moderatable_id", nil], ["moderatable_type", "Task"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23377
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23378
+  (0.1ms) SELECT COUNT(*) FROM "tasks"
23379
+  (0.1ms) SELECT COUNT(*) FROM "subtasks" 
23380
+ Moderation Load (0.1ms) SELECT "moderations".* FROM "moderations" ORDER BY "moderations"."id" DESC LIMIT 1
23381
+  (0.0ms) SAVEPOINT active_record_1
23382
+ SQL (0.3ms) INSERT INTO "tasks" ("created_at", "desc", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["desc", nil], ["title", "Bye Bye"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23383
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23384
+  (0.0ms) SAVEPOINT active_record_1
23385
+ SQL (0.3ms) INSERT INTO "subtasks" ("created_at", "desc", "task_all_id", "task_id", "title", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["desc", nil], ["task_all_id", nil], ["task_id", 1], ["title", "Hollywood Hills"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23386
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23387
+  (0.0ms) SAVEPOINT active_record_1
23388
+ SQL (0.1ms) DELETE FROM "moderations" WHERE "moderations"."id" = ? [["id", 1]]
23389
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23390
+  (0.1ms) SELECT COUNT(*) FROM "moderations"
23391
+ Task Load (0.1ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" DESC LIMIT 1
23392
+  (0.1ms) SELECT COUNT(*) FROM "subtasks" WHERE "subtasks"."task_id" = 1
23393
+ Subtask Load (0.1ms) SELECT "subtasks".* FROM "subtasks" WHERE "subtasks"."task_id" = 1 LIMIT 1
23394
+  (0.0ms) SAVEPOINT active_record_1
23395
+ SQL (0.6ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "-"], ["attr_value", "--- \n:main_model: \n created_at: \n title: Bye Bye\n updated_at: \n id: \n desc: Hollywood Hills\n:associations: {}\n\n"], ["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["moderatable_id", nil], ["moderatable_type", "Task"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23396
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23397
+  (0.1ms) SELECT COUNT(*) FROM "moderations" 
23398
+ Moderation Load (0.1ms) SELECT "moderations".* FROM "moderations" ORDER BY "moderations"."id" DESC LIMIT 1
23399
+  (0.0ms) SAVEPOINT active_record_1
23400
+ SQL (0.3ms) INSERT INTO "tasks" ("created_at", "desc", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["desc", "Hollywood Hills"], ["title", "Bye Bye"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23401
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23402
+  (0.0ms) SAVEPOINT active_record_1
23403
+ SQL (0.1ms) DELETE FROM "moderations" WHERE "moderations"."id" = ? [["id", 1]]
23404
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23405
+  (0.1ms) SELECT COUNT(*) FROM "moderations" 
23406
+ Task Load (0.1ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" DESC LIMIT 1
23407
+ Task Load (0.1ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" DESC LIMIT 1
23408
+  (0.0ms) SAVEPOINT active_record_1
23409
+ SQL (0.6ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "-"], ["attr_value", "--- \n:main_model: \n created_at: \n title: Bye Bye\n updated_at: \n id: \n desc: \n:associations: {}\n\n"], ["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["moderatable_id", nil], ["moderatable_type", "Task"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23410
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23411
+ Moderation Load (0.1ms) SELECT "moderations".* FROM "moderations" ORDER BY "moderations"."id" DESC LIMIT 1
23412
+  (0.1ms) SAVEPOINT active_record_1
23413
+ SQL (0.3ms) INSERT INTO "tasks" ("created_at", "desc", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["desc", nil], ["title", "Bye Bye"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23414
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23415
+  (0.0ms) SAVEPOINT active_record_1
23416
+ SQL (0.1ms) DELETE FROM "moderations" WHERE "moderations"."id" = ? [["id", 1]]
23417
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23418
+ Task Load (0.1ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" DESC LIMIT 1
23419
+  (0.0ms) SAVEPOINT active_record_1
23420
+ SQL (0.3ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "desc"], ["attr_value", "--- Hollywood Hills\n"], ["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["moderatable_id", 1], ["moderatable_type", "Task"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23421
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23422
+  (0.1ms) SELECT COUNT(*) FROM "moderations"
23423
+ Task Load (0.1ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" DESC LIMIT 1
23424
+ Moderation Load (0.1ms) SELECT "moderations".* FROM "moderations" ORDER BY "moderations"."id" DESC LIMIT 1
23425
+ Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = 1 LIMIT 1
23426
+  (0.0ms) SAVEPOINT active_record_1
23427
+  (0.2ms) UPDATE "tasks" SET "updated_at" = '2011-10-06 00:05:09.208179', "desc" = 'Hollywood Hills' WHERE "tasks"."id" = 1
23428
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23429
+  (0.0ms) SAVEPOINT active_record_1
23430
+ SQL (0.1ms) DELETE FROM "moderations" WHERE "moderations"."id" = ? [["id", 2]]
23431
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23432
+ Task Load (0.1ms) SELECT "tasks".* FROM "tasks" ORDER BY "tasks"."id" DESC LIMIT 1
23433
+  (0.0ms) SAVEPOINT active_record_1
23434
+ SQL (0.7ms) INSERT INTO "subtasks" ("created_at", "desc", "task_all_id", "task_id", "title", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["desc", nil], ["task_all_id", nil], ["task_id", nil], ["title", "Bye Bye"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23435
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23436
+  (0.1ms) SELECT COUNT(*) FROM "subtasks"
23437
+  (0.0ms) SAVEPOINT active_record_1
23438
+  (0.0ms) RELEASE SAVEPOINT active_record_1
23439
+  (0.0ms) SAVEPOINT active_record_1
23440
+ SQL (0.3ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "-"], ["attr_value", "--- \n:main_model: \n created_at: \n title: Hollywood Hills\n updated_at: \n id: \n desc: \n:associations: \n :subtasks: \n - 1\n"], ["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["moderatable_id", nil], ["moderatable_type", "Task"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23441
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23442
+  (0.1ms) SELECT COUNT(*) FROM "tasks"
23443
+ Subtask Load (0.1ms) SELECT "subtasks".* FROM "subtasks" LIMIT 1
23444
+ Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" IS NULL LIMIT 1
23445
+ Moderation Load (0.1ms) SELECT "moderations".* FROM "moderations" ORDER BY "moderations"."id" DESC LIMIT 1
23446
+  (0.0ms) SAVEPOINT active_record_1
23447
+ SQL (0.3ms) INSERT INTO "tasks" ("created_at", "desc", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["desc", nil], ["title", "Hollywood Hills"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23448
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23449
+ Subtask Load (0.1ms) SELECT "subtasks".* FROM "subtasks" WHERE "subtasks"."id" = 1 LIMIT 1
23450
+  (0.0ms) SAVEPOINT active_record_1
23451
+  (0.1ms) UPDATE "subtasks" SET "task_id" = 1, "updated_at" = '2011-10-06 00:05:09.230975' WHERE "subtasks"."id" = 1
23452
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23453
+  (0.0ms) SAVEPOINT active_record_1
23454
+ SQL (0.1ms) DELETE FROM "moderations" WHERE "moderations"."id" = ? [["id", 1]]
23455
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23456
+ Subtask Load (0.1ms) SELECT "subtasks".* FROM "subtasks" LIMIT 1
23457
+ Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = 1 LIMIT 1
23458
+ Task Load (0.1ms) SELECT "tasks".* FROM "tasks" LIMIT 1
23459
+  (0.1ms) SELECT COUNT(*) FROM "subtasks" WHERE "subtasks"."task_id" = 1
23460
+ Subtask Load (0.1ms) SELECT "subtasks".* FROM "subtasks" WHERE "subtasks"."task_id" = 1 LIMIT 1
23461
+  (0.1ms) SAVEPOINT active_record_1
23462
+ SQL (0.6ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "-"], ["attr_value", "--- \n:main_model: \n created_at: \n title: Bye Bye\n updated_at: \n id: \n value: \n:associations: \n :subtasks: \n - created_at: \n task_id: \n title: Hollywood Hills\n updated_at: \n id: \n task_all_id: \n desc: \n"], ["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["moderatable_id", nil], ["moderatable_type", "TaskAll"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23463
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23464
+  (0.1ms) SELECT COUNT(*) FROM "task_alls"
23465
+  (0.0ms) SELECT COUNT(*) FROM "subtasks" 
23466
+ Moderation Load (0.1ms) SELECT "moderations".* FROM "moderations" ORDER BY "moderations"."id" DESC LIMIT 1
23467
+  (0.0ms) SAVEPOINT active_record_1
23468
+ SQL (0.3ms) INSERT INTO "task_alls" ("created_at", "title", "updated_at", "value") VALUES (?, ?, ?, ?) [["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["title", "Bye Bye"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["value", nil]]
23469
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23470
+  (0.0ms) SAVEPOINT active_record_1
23471
+ SQL (0.3ms) INSERT INTO "subtasks" ("created_at", "desc", "task_all_id", "task_id", "title", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["desc", nil], ["task_all_id", 1], ["task_id", nil], ["title", "Hollywood Hills"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23472
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23473
+  (0.0ms) SAVEPOINT active_record_1
23474
+ SQL (0.1ms) DELETE FROM "moderations" WHERE "moderations"."id" = ? [["id", 1]]
23475
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23476
+  (0.1ms) SELECT COUNT(*) FROM "task_alls"
23477
+  (0.1ms) SELECT COUNT(*) FROM "subtasks" 
23478
+ TaskAll Load (0.1ms) SELECT "task_alls".* FROM "task_alls" LIMIT 1
23479
+ TaskAll Load (0.1ms) SELECT "task_alls".* FROM "task_alls" LIMIT 1
23480
+ Subtask Load (0.1ms) SELECT "subtasks".* FROM "subtasks" WHERE "subtasks"."task_all_id" = 1 LIMIT 1
23481
+  (0.0ms) SAVEPOINT active_record_1
23482
+ SQL (0.7ms) INSERT INTO "subtasks" ("created_at", "desc", "task_all_id", "task_id", "title", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["desc", nil], ["task_all_id", nil], ["task_id", nil], ["title", "Bye Bye"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23483
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23484
+  (0.1ms) SELECT COUNT(*) FROM "subtasks"
23485
+  (0.0ms) SAVEPOINT active_record_1
23486
+  (0.0ms) RELEASE SAVEPOINT active_record_1
23487
+  (0.0ms) SAVEPOINT active_record_1
23488
+ SQL (0.4ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "-"], ["attr_value", "--- \n:main_model: \n created_at: \n title: Hollywood Hills\n updated_at: \n id: \n desc: \n:associations: \n :subtasks: \n - 1\n"], ["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["moderatable_id", nil], ["moderatable_type", "Task"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23489
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23490
+  (0.1ms) SELECT COUNT(*) FROM "tasks"
23491
+ SQL (0.1ms) DELETE FROM "subtasks"
23492
+  (0.1ms) SELECT COUNT(*) FROM "subtasks"
23493
+ Moderation Load (0.1ms) SELECT "moderations".* FROM "moderations" ORDER BY "moderations"."id" DESC LIMIT 1
23494
+  (0.0ms) SAVEPOINT active_record_1
23495
+ SQL (0.4ms) INSERT INTO "tasks" ("created_at", "desc", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["desc", nil], ["title", "Hollywood Hills"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23496
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23497
+ Subtask Load (0.1ms) SELECT "subtasks".* FROM "subtasks" WHERE "subtasks"."id" = 1 LIMIT 1
23498
+  (0.0ms) SAVEPOINT active_record_1
23499
+ SQL (0.1ms) DELETE FROM "moderations" WHERE "moderations"."id" = ? [["id", 1]]
23500
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23501
+ Task Load (0.1ms) SELECT "tasks".* FROM "tasks" LIMIT 1
23502
+  (0.1ms) SELECT COUNT(*) FROM "subtasks" WHERE "subtasks"."task_id" = 1
23503
+  (0.0ms) SELECT COUNT(*) FROM "subtasks" 
23504
+  (0.0ms) SAVEPOINT active_record_1
23505
+ SQL (0.6ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "-"], ["attr_value", "--- \n:main_model: \n created_at: \n title: Bye Bye\n updated_at: \n id: \n desc: \n:associations: {}\n\n"], ["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["moderatable_id", nil], ["moderatable_type", "Task"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23506
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23507
+ Moderation Load (0.1ms) SELECT "moderations".* FROM "moderations" ORDER BY "moderations"."id" DESC LIMIT 1
23508
+  (0.1ms) SAVEPOINT active_record_1
23509
+ SQL (0.3ms) INSERT INTO "tasks" ("created_at", "desc", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["desc", nil], ["title", "Bye Bye"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23510
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23511
+  (0.0ms) SAVEPOINT active_record_1
23512
+ SQL (0.1ms) DELETE FROM "moderations" WHERE "moderations"."id" = ? [["id", 1]]
23513
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23514
+  (0.1ms) SELECT COUNT(*) FROM "tasks"
23515
+ Task Load (0.1ms) SELECT "tasks".* FROM "tasks" LIMIT 1
23516
+  (0.0ms) SAVEPOINT active_record_1
23517
+ SQL (0.3ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "-"], ["attr_value", "destroy"], ["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["moderatable_id", 1], ["moderatable_type", "Task"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23518
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23519
+  (0.1ms) SELECT COUNT(*) FROM "tasks" 
23520
+ Moderation Load (0.1ms) SELECT "moderations".* FROM "moderations" ORDER BY "moderations"."id" DESC LIMIT 1
23521
+ Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = 1 LIMIT 1
23522
+  (0.0ms) SAVEPOINT active_record_1
23523
+ Moderation Load (0.1ms) SELECT "moderations".* FROM "moderations" WHERE "moderations"."moderatable_id" = 1 AND "moderations"."moderatable_type" = 'Task'
23524
+ SQL (0.1ms) DELETE FROM "moderations" WHERE "moderations"."id" = ? [["id", 2]]
23525
+ SQL (0.1ms) DELETE FROM "tasks" WHERE "tasks"."id" = ? [["id", 1]]
23526
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23527
+  (0.0ms) SAVEPOINT active_record_1
23528
+ SQL (0.0ms) DELETE FROM "moderations" WHERE "moderations"."id" = ? [["id", 2]]
23529
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23530
+  (0.1ms) SELECT COUNT(*) FROM "tasks"
23531
+  (0.0ms) SAVEPOINT active_record_1
23532
+ SQL (0.6ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "-"], ["attr_value", "--- \n:main_model: \n created_at: \n title: Bye Bye\n updated_at: \n id: \n desc: \n:associations: {}\n\n"], ["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["moderatable_id", nil], ["moderatable_type", "Task"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23533
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23534
+ Moderation Load (0.1ms) SELECT "moderations".* FROM "moderations" ORDER BY "moderations"."id" DESC LIMIT 1
23535
+  (0.0ms) SAVEPOINT active_record_1
23536
+ SQL (0.3ms) INSERT INTO "tasks" ("created_at", "desc", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["desc", nil], ["title", "Bye Bye"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23537
+  (0.2ms) RELEASE SAVEPOINT active_record_1
23538
+  (0.0ms) SAVEPOINT active_record_1
23539
+ SQL (0.1ms) DELETE FROM "moderations" WHERE "moderations"."id" = ? [["id", 1]]
23540
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23541
+ Task Load (0.1ms) SELECT "tasks".* FROM "tasks" LIMIT 1
23542
+  (0.1ms) SAVEPOINT active_record_1
23543
+ SQL (1.3ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "-"], ["attr_value", {:associations=>{:subtasks=>[{"created_at"=>nil, "task_id"=>1, "title"=>"Hollywood Hills", "updated_at"=>nil, "id"=>nil, "task_all_id"=>nil, "desc"=>nil}]}}], ["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["moderatable_id", 1], ["moderatable_type", "Task"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23544
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23545
+  (0.1ms) SELECT COUNT(*) FROM "subtasks" WHERE "subtasks"."task_id" = 1
23546
+  (0.0ms) SAVEPOINT active_record_1
23547
+  (0.0ms) RELEASE SAVEPOINT active_record_1
23548
+  (0.1ms) SELECT COUNT(*) FROM "subtasks" WHERE "subtasks"."task_id" = 1
23549
+  (0.0ms) SELECT COUNT(*) FROM "subtasks" 
23550
+ Moderation Load (0.1ms) SELECT "moderations".* FROM "moderations" ORDER BY "moderations"."id" DESC LIMIT 1
23551
+ Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = 1 LIMIT 1
23552
+  (0.0ms) SAVEPOINT active_record_1
23553
+ SQL (0.3ms) INSERT INTO "subtasks" ("created_at", "desc", "task_all_id", "task_id", "title", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["desc", nil], ["task_all_id", nil], ["task_id", 1], ["title", "Hollywood Hills"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23554
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23555
+  (0.0ms) SAVEPOINT active_record_1
23556
+ SQL (0.1ms) DELETE FROM "moderations" WHERE "moderations"."id" = ? [["id", 2]]
23557
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23558
+  (0.1ms) SELECT COUNT(*) FROM "subtasks" WHERE "subtasks"."task_id" = 1
23559
+  (0.0ms) SELECT COUNT(*) FROM "subtasks" 
23560
+ Task Load (0.1ms) SELECT "tasks".* FROM "tasks" LIMIT 1
23561
+ Subtask Load (0.1ms) SELECT "subtasks".* FROM "subtasks" WHERE "subtasks"."task_id" = 1 LIMIT 1
23562
+  (0.0ms) SAVEPOINT active_record_1
23563
+ SQL (0.6ms) INSERT INTO "subtasks" ("created_at", "desc", "task_all_id", "task_id", "title", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["desc", nil], ["task_all_id", nil], ["task_id", nil], ["title", "Hollywood Hills"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23564
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23565
+  (0.0ms) SAVEPOINT active_record_1
23566
+ SQL (0.3ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "-"], ["attr_value", "--- \n:main_model: \n created_at: \n title: Bye Bye\n updated_at: \n id: \n desc: \n:associations: {}\n\n"], ["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["moderatable_id", nil], ["moderatable_type", "Task"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23567
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23568
+ Moderation Load (0.1ms) SELECT "moderations".* FROM "moderations" ORDER BY "moderations"."id" DESC LIMIT 1
23569
+  (0.0ms) SAVEPOINT active_record_1
23570
+ SQL (0.4ms) INSERT INTO "tasks" ("created_at", "desc", "title", "updated_at") VALUES (?, ?, ?, ?) [["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["desc", nil], ["title", "Bye Bye"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23571
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23572
+  (0.0ms) SAVEPOINT active_record_1
23573
+ SQL (0.2ms) DELETE FROM "moderations" WHERE "moderations"."id" = ? [["id", 1]]
23574
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23575
+ Task Load (0.1ms) SELECT "tasks".* FROM "tasks" LIMIT 1
23576
+  (0.0ms) SAVEPOINT active_record_1
23577
+ SQL (0.6ms) INSERT INTO "moderations" ("attr_name", "attr_value", "created_at", "moderatable_id", "moderatable_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["attr_name", "-"], ["attr_value", {:associations=>{:subtasks=>[1]}}], ["created_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00], ["moderatable_id", 1], ["moderatable_type", "Task"], ["updated_at", Thu, 06 Oct 2011 00:05:09 UTC +00:00]]
23578
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23579
+  (0.1ms) SELECT COUNT(*) FROM "subtasks" WHERE "subtasks"."task_id" = 1
23580
+  (0.1ms) SELECT COUNT(*) FROM "subtasks"
23581
+  (0.0ms) SAVEPOINT active_record_1
23582
+  (0.0ms) RELEASE SAVEPOINT active_record_1
23583
+  (0.1ms) SELECT COUNT(*) FROM "subtasks" WHERE "subtasks"."task_id" = 1
23584
+ Moderation Load (0.1ms) SELECT "moderations".* FROM "moderations" ORDER BY "moderations"."id" DESC LIMIT 1
23585
+ Task Load (0.1ms) SELECT "tasks".* FROM "tasks" WHERE "tasks"."id" = 1 LIMIT 1
23586
+ Subtask Load (0.1ms) SELECT "subtasks".* FROM "subtasks" WHERE "subtasks"."id" = 1 LIMIT 1
23587
+  (0.0ms) SAVEPOINT active_record_1
23588
+  (0.1ms) UPDATE "subtasks" SET "task_id" = 1, "updated_at" = '2011-10-06 00:05:09.431562' WHERE "subtasks"."id" = 1
23589
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23590
+  (0.0ms) SAVEPOINT active_record_1
23591
+ SQL (0.1ms) DELETE FROM "moderations" WHERE "moderations"."id" = ? [["id", 2]]
23592
+  (0.1ms) RELEASE SAVEPOINT active_record_1
23593
+  (0.1ms) SELECT COUNT(*) FROM "subtasks" WHERE "subtasks"."task_id" = 1
23594
+  (0.0ms) SELECT COUNT(*) FROM "subtasks"
23595
+ Task Load (0.1ms) SELECT "tasks".* FROM "tasks" LIMIT 1
23596
+ Subtask Load (0.1ms) SELECT "subtasks".* FROM "subtasks" WHERE "subtasks"."task_id" = 1 LIMIT 1
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: has_moderated
3
3
  version: !ruby/object:Gem::Version
4
- hash: 61
4
+ hash: 59
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 17
10
- version: 0.0.17
9
+ - 18
10
+ version: 0.0.18
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jan Berdajs
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-10-04 00:00:00 +02:00
18
+ date: 2011-10-06 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency