marks 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,9 +3,9 @@ class CreateMarksMarks < ActiveRecord::Migration
3
3
  create_table :marks_marks do |t|
4
4
  t.references :marker, polymorphic: true
5
5
  t.references :markable, polymorphic: true
6
- t.string :type
6
+ t.string :mark_type
7
7
  t.timestamps
8
8
  end
9
- add_index :marks_marks, [:type, :markable_type, :markable_id]
9
+ add_index :marks_marks, [:mark_type, :markable_type, :markable_id]
10
10
  end
11
11
  end
@@ -11,7 +11,7 @@ module Marks
11
11
  classified_mark = mark.to_s.classify
12
12
  raise ArgumentError unless types.map { |t| t.to_s.classify }.include?(classified_mark)
13
13
  klass = class_name.to_s.classify.constantize
14
- klass.joins(:outgoing_marks).where('marks_marks.type = ? AND markable_type = ? AND markable_id = ?', mark.to_s.classify, self.class.base_class.to_s, self)
14
+ klass.joins(:outgoing_marks).where('marks_marks.mark_type = ? AND markable_type = ? AND markable_id = ?', mark.to_s.classify, self.class.base_class.to_s, self)
15
15
  end
16
16
  end
17
17
  end
@@ -11,7 +11,7 @@ module Marks
11
11
  classified_mark = mark.to_s.classify
12
12
  raise ArgumentError unless types.map { |t| t.to_s.classify }.include?(classified_mark)
13
13
  Marks::Mark.create do |c|
14
- c.type = classified_mark
14
+ c.mark_type = classified_mark
15
15
  c.marker = self
16
16
  c.markable = markable
17
17
  end
@@ -20,7 +20,7 @@ module Marks
20
20
  define_method :'marks?' do |markable, mark|
21
21
  classified_mark = mark.to_s.classify
22
22
  raise ArgumentError unless types.map { |t| t.to_s.classify }.include?(classified_mark)
23
- outgoing_marks.where(type: classified_mark, markable_type: markable.class.table_name.classify, markable_id: markable).any?
23
+ outgoing_marks.where(mark_type: classified_mark, markable_type: markable.class.table_name.classify, markable_id: markable).any?
24
24
  end
25
25
  end
26
26
  end
@@ -1,3 +1,3 @@
1
1
  module Marks
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
@@ -18,11 +18,13 @@ ActiveRecord::Schema.define(:version => 20121116121923) do
18
18
  t.string "marker_type"
19
19
  t.integer "markable_id"
20
20
  t.string "markable_type"
21
- t.string "type"
21
+ t.string "mark_type"
22
22
  t.datetime "created_at", :null => false
23
23
  t.datetime "updated_at", :null => false
24
24
  end
25
25
 
26
+ add_index "marks_marks", ["mark_type", "markable_type", "markable_id"], :name => "index_marks_marks_on_mark_type_and_markable_type_and_markable_id"
27
+
26
28
  create_table "replies", :force => true do |t|
27
29
  t.datetime "created_at", :null => false
28
30
  t.datetime "updated_at", :null => false
Binary file
@@ -177,3 +177,124 @@ Connecting to database specified by database.yml
177
177
   (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20121116121913')
178
178
   (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20121116121922')
179
179
   (1.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
180
+ Connecting to database specified by database.yml
181
+  (3.5ms) select sqlite_version(*)
182
+  (1.3ms) CREATE TABLE "marks_marks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "marker_id" integer, "marker_type" varchar(255), "markable_id" integer, "markable_type" varchar(255), "type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
183
+  (3.3ms) CREATE TABLE "replies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
184
+  (4.5ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
185
+  (2.6ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
186
+  (4.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
187
+  (0.1ms) SELECT version FROM "schema_migrations"
188
+  (14.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20121116121923')
189
+  (1.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20121116121913')
190
+  (6.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20121116121922')
191
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
192
+ Connecting to database specified by database.yml
193
+  (2.1ms) select sqlite_version(*)
194
+  (2.1ms) DROP TABLE "marks_marks"
195
+  (1.1ms) CREATE TABLE "marks_marks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "marker_id" integer, "marker_type" varchar(255), "markable_id" integer, "markable_type" varchar(255), "type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
196
+  (1.2ms) DROP TABLE "replies"
197
+  (0.9ms) CREATE TABLE "replies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
198
+  (12.2ms) DROP TABLE "users"
199
+  (1.1ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
200
+  (2.1ms) SELECT version FROM "schema_migrations"
201
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
202
+ Connecting to database specified by database.yml
203
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
204
+  (0.4ms) select sqlite_version(*)
205
+  (1.1ms) CREATE TABLE "marks_marks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "marker_id" integer, "marker_type" varchar(255), "markable_id" integer, "markable_type" varchar(255), "type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
206
+  (0.7ms) CREATE TABLE "replies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
207
+  (0.9ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
208
+  (0.7ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
209
+  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
210
+  (0.1ms) SELECT version FROM "schema_migrations"
211
+  (2.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20121116121923')
212
+  (1.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20121116121913')
213
+  (1.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20121116121922')
214
+ Connecting to database specified by database.yml
215
+  (1.9ms) select sqlite_version(*)
216
+  (5.4ms) CREATE TABLE "marks_marks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "marker_id" integer, "marker_type" varchar(255), "markable_id" integer, "markable_type" varchar(255), "type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
217
+  (0.8ms) CREATE TABLE "replies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
218
+  (0.7ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
219
+  (0.7ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
220
+  (1.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
221
+  (0.1ms) SELECT version FROM "schema_migrations"
222
+  (1.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20121116121923')
223
+  (1.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20121116121913')
224
+  (6.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20121116121922')
225
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
226
+ Connecting to database specified by database.yml
227
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
228
+  (0.3ms) select sqlite_version(*)
229
+  (1.0ms) CREATE TABLE "marks_marks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "marker_id" integer, "marker_type" varchar(255), "markable_id" integer, "markable_type" varchar(255), "type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
230
+  (0.8ms) CREATE TABLE "replies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
231
+  (0.7ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
232
+  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
233
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
234
+  (0.1ms) SELECT version FROM "schema_migrations"
235
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20121116121923')
236
+  (1.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20121116121913')
237
+  (1.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20121116121922')
238
+ Connecting to database specified by database.yml
239
+ Connecting to database specified by database.yml
240
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
241
+ Migrating to CreateUsers (20121116121913)
242
+ Migrating to CreateReplies (20121116121922)
243
+ Migrating to CreateMarksMarks (20121116121923)
244
+  (0.1ms) select sqlite_version(*)
245
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
246
+ Connecting to database specified by database.yml
247
+  (1.9ms) select sqlite_version(*)
248
+  (1.7ms) DROP TABLE "marks_marks"
249
+  (1.0ms) CREATE TABLE "marks_marks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "marker_id" integer, "marker_type" varchar(255), "markable_id" integer, "markable_type" varchar(255), "type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
250
+  (0.9ms) DROP TABLE "replies"
251
+  (0.8ms) CREATE TABLE "replies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
252
+  (0.8ms) DROP TABLE "users"
253
+  (1.6ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
254
+  (0.3ms) SELECT version FROM "schema_migrations"
255
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
256
+ Connecting to database specified by database.yml
257
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
258
+  (0.4ms) select sqlite_version(*)
259
+  (1.0ms) DROP TABLE "marks_marks"
260
+  (1.0ms) CREATE TABLE "marks_marks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "marker_id" integer, "marker_type" varchar(255), "markable_id" integer, "markable_type" varchar(255), "type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
261
+  (0.8ms) DROP TABLE "replies"
262
+  (0.9ms) CREATE TABLE "replies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
263
+  (0.8ms) DROP TABLE "users"
264
+  (1.6ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
265
+  (0.4ms) SELECT version FROM "schema_migrations"
266
+ Connecting to database specified by database.yml
267
+  (0.2ms) select sqlite_version(*)
268
+  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
269
+  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
270
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
271
+ Migrating to CreateUsers (20121116121913)
272
+  (0.0ms) begin transaction
273
+  (0.5ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
274
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20121116121913')
275
+  (1.0ms) commit transaction
276
+ Migrating to CreateReplies (20121116121922)
277
+  (0.0ms) begin transaction
278
+  (0.4ms) CREATE TABLE "replies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
279
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20121116121922')
280
+  (1.8ms) commit transaction
281
+ Migrating to CreateMarksMarks (20121116121923)
282
+  (0.1ms) begin transaction
283
+  (3.6ms) CREATE TABLE "marks_marks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "marker_id" integer, "marker_type" varchar(255), "markable_id" integer, "markable_type" varchar(255), "mark_type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
284
+  (0.2ms) CREATE INDEX "index_marks_marks_on_mark_type_and_markable_type_and_markable_id" ON "marks_marks" ("mark_type", "markable_type", "markable_id")
285
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20121116121923')
286
+  (1.1ms) commit transaction
287
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
288
+ Connecting to database specified by database.yml
289
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
290
+  (0.3ms) select sqlite_version(*)
291
+  (1.7ms) CREATE TABLE "marks_marks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "marker_id" integer, "marker_type" varchar(255), "markable_id" integer, "markable_type" varchar(255), "mark_type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
292
+  (1.7ms) CREATE INDEX "index_marks_marks_on_mark_type_and_markable_type_and_markable_id" ON "marks_marks" ("mark_type", "markable_type", "markable_id")
293
+  (7.5ms) CREATE TABLE "replies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
294
+  (1.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
295
+  (21.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
296
+  (10.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
297
+  (0.1ms) SELECT version FROM "schema_migrations"
298
+  (8.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20121116121923')
299
+  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20121116121913')
300
+  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20121116121922')
@@ -1100,3 +1100,104 @@ Connecting to database specified by database.yml
1100
1100
   (0.0ms) RELEASE SAVEPOINT active_record_1
1101
1101
   (0.1ms) SELECT COUNT(*) FROM "marks_marks" WHERE "marks_marks"."marker_id" = 1 AND "marks_marks"."marker_type" = 'User' AND "marks_marks"."type" = 'Nice' AND "marks_marks"."markable_type" = 'Reply' AND "marks_marks"."markable_id" = 1
1102
1102
   (0.2ms) rollback transaction
1103
+ Connecting to database specified by database.yml
1104
+  (0.4ms) begin transaction
1105
+  (0.5ms) rollback transaction
1106
+  (0.1ms) begin transaction
1107
+  (0.0ms) rollback transaction
1108
+ Connecting to database specified by database.yml
1109
+  (0.5ms) begin transaction
1110
+  (2.9ms) SAVEPOINT active_record_1
1111
+ SQL (9.1ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Mon, 19 Nov 2012 12:54:16 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:54:16 UTC +00:00]]
1112
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1113
+  (0.1ms) SAVEPOINT active_record_1
1114
+ SQL (18.6ms) INSERT INTO "replies" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Mon, 19 Nov 2012 12:54:17 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:54:17 UTC +00:00]]
1115
+  (4.0ms) RELEASE SAVEPOINT active_record_1
1116
+  (0.7ms) SELECT COUNT(*) FROM "users" INNER JOIN "marks_marks" ON "marks_marks"."marker_id" = "users"."id" AND "marks_marks"."marker_type" = 'User' WHERE (marks_marks.mark_type = 'Nice' AND markable_type = 'Reply' AND markable_id = 1)
1117
+ SQLite3::SQLException: no such column: marks_marks.mark_type: SELECT COUNT(*) FROM "users" INNER JOIN "marks_marks" ON "marks_marks"."marker_id" = "users"."id" AND "marks_marks"."marker_type" = 'User' WHERE (marks_marks.mark_type = 'Nice' AND markable_type = 'Reply' AND markable_id = 1)
1118
+  (0.6ms) rollback transaction
1119
+  (0.1ms) begin transaction
1120
+  (0.0ms) SAVEPOINT active_record_1
1121
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Mon, 19 Nov 2012 12:54:17 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:54:17 UTC +00:00]]
1122
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1123
+  (0.0ms) SAVEPOINT active_record_1
1124
+ SQL (0.4ms) INSERT INTO "replies" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Mon, 19 Nov 2012 12:54:17 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:54:17 UTC +00:00]]
1125
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1126
+  (0.2ms) SELECT COUNT(*) FROM "marks_marks" WHERE "marks_marks"."marker_id" = 1 AND "marks_marks"."marker_type" = 'User' AND "marks_marks"."mark_type" = 'Nice' AND "marks_marks"."markable_type" = 'Reply' AND "marks_marks"."markable_id" = 1
1127
+ SQLite3::SQLException: no such column: marks_marks.mark_type: SELECT COUNT(*) FROM "marks_marks" WHERE "marks_marks"."marker_id" = 1 AND "marks_marks"."marker_type" = 'User' AND "marks_marks"."mark_type" = 'Nice' AND "marks_marks"."markable_type" = 'Reply' AND "marks_marks"."markable_id" = 1
1128
+  (0.6ms) rollback transaction
1129
+ Connecting to database specified by database.yml
1130
+  (0.5ms) begin transaction
1131
+  (0.1ms) SAVEPOINT active_record_1
1132
+ SQL (8.3ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Mon, 19 Nov 2012 12:55:46 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:55:46 UTC +00:00]]
1133
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1134
+  (0.1ms) SAVEPOINT active_record_1
1135
+ SQL (0.7ms) INSERT INTO "replies" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Mon, 19 Nov 2012 12:55:46 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:55:46 UTC +00:00]]
1136
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1137
+  (0.2ms) SELECT COUNT(*) FROM "users" INNER JOIN "marks_marks" ON "marks_marks"."marker_id" = "users"."id" AND "marks_marks"."marker_type" = 'User' WHERE (marks_marks.mark_type = 'Nice' AND markable_type = 'Reply' AND markable_id = 1)
1138
+ SQLite3::SQLException: no such column: marks_marks.mark_type: SELECT COUNT(*) FROM "users" INNER JOIN "marks_marks" ON "marks_marks"."marker_id" = "users"."id" AND "marks_marks"."marker_type" = 'User' WHERE (marks_marks.mark_type = 'Nice' AND markable_type = 'Reply' AND markable_id = 1)
1139
+  (0.7ms) rollback transaction
1140
+  (0.1ms) begin transaction
1141
+  (0.0ms) SAVEPOINT active_record_1
1142
+ SQL (0.6ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Mon, 19 Nov 2012 12:55:46 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:55:46 UTC +00:00]]
1143
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1144
+  (0.0ms) SAVEPOINT active_record_1
1145
+ SQL (0.4ms) INSERT INTO "replies" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Mon, 19 Nov 2012 12:55:46 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:55:46 UTC +00:00]]
1146
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1147
+  (0.2ms) SELECT COUNT(*) FROM "marks_marks" WHERE "marks_marks"."marker_id" = 1 AND "marks_marks"."marker_type" = 'User' AND "marks_marks"."mark_type" = 'Nice' AND "marks_marks"."markable_type" = 'Reply' AND "marks_marks"."markable_id" = 1
1148
+ SQLite3::SQLException: no such column: marks_marks.mark_type: SELECT COUNT(*) FROM "marks_marks" WHERE "marks_marks"."marker_id" = 1 AND "marks_marks"."marker_type" = 'User' AND "marks_marks"."mark_type" = 'Nice' AND "marks_marks"."markable_type" = 'Reply' AND "marks_marks"."markable_id" = 1
1149
+  (0.6ms) rollback transaction
1150
+ Connecting to database specified by database.yml
1151
+  (0.5ms) begin transaction
1152
+  (0.1ms) SAVEPOINT active_record_1
1153
+ SQL (6.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Mon, 19 Nov 2012 12:57:29 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:57:29 UTC +00:00]]
1154
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1155
+  (0.1ms) SAVEPOINT active_record_1
1156
+ SQL (19.6ms) INSERT INTO "replies" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Mon, 19 Nov 2012 12:57:29 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:57:29 UTC +00:00]]
1157
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1158
+  (14.3ms) SELECT COUNT(*) FROM "users" INNER JOIN "marks_marks" ON "marks_marks"."marker_id" = "users"."id" AND "marks_marks"."marker_type" = 'User' WHERE (marks_marks.mark_type = 'Nice' AND markable_type = 'Reply' AND markable_id = 1)
1159
+ SQLite3::SQLException: no such column: marks_marks.mark_type: SELECT COUNT(*) FROM "users" INNER JOIN "marks_marks" ON "marks_marks"."marker_id" = "users"."id" AND "marks_marks"."marker_type" = 'User' WHERE (marks_marks.mark_type = 'Nice' AND markable_type = 'Reply' AND markable_id = 1)
1160
+  (0.6ms) rollback transaction
1161
+  (0.1ms) begin transaction
1162
+  (0.0ms) SAVEPOINT active_record_1
1163
+ SQL (0.5ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Mon, 19 Nov 2012 12:57:29 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:57:29 UTC +00:00]]
1164
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1165
+  (0.0ms) SAVEPOINT active_record_1
1166
+ SQL (0.5ms) INSERT INTO "replies" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Mon, 19 Nov 2012 12:57:29 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:57:29 UTC +00:00]]
1167
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1168
+  (0.2ms) SELECT COUNT(*) FROM "marks_marks" WHERE "marks_marks"."marker_id" = 1 AND "marks_marks"."marker_type" = 'User' AND "marks_marks"."mark_type" = 'Nice' AND "marks_marks"."markable_type" = 'Reply' AND "marks_marks"."markable_id" = 1
1169
+ SQLite3::SQLException: no such column: marks_marks.mark_type: SELECT COUNT(*) FROM "marks_marks" WHERE "marks_marks"."marker_id" = 1 AND "marks_marks"."marker_type" = 'User' AND "marks_marks"."mark_type" = 'Nice' AND "marks_marks"."markable_type" = 'Reply' AND "marks_marks"."markable_id" = 1
1170
+  (0.6ms) rollback transaction
1171
+ Connecting to database specified by database.yml
1172
+  (0.5ms) begin transaction
1173
+  (0.0ms) SAVEPOINT active_record_1
1174
+ SQL (5.7ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00]]
1175
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1176
+  (0.0ms) SAVEPOINT active_record_1
1177
+ SQL (0.6ms) INSERT INTO "replies" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00]]
1178
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1179
+  (0.2ms) SELECT COUNT(*) FROM "users" INNER JOIN "marks_marks" ON "marks_marks"."marker_id" = "users"."id" AND "marks_marks"."marker_type" = 'User' WHERE (marks_marks.mark_type = 'Nice' AND markable_type = 'Reply' AND markable_id = 1)
1180
+  (0.1ms) SAVEPOINT active_record_1
1181
+ SQL (0.6ms) INSERT INTO "marks_marks" ("created_at", "mark_type", "markable_id", "markable_type", "marker_id", "marker_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00], ["mark_type", "Nice"], ["markable_id", 1], ["markable_type", "Reply"], ["marker_id", 1], ["marker_type", "User"], ["updated_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00]]
1182
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1183
+  (0.0ms) SAVEPOINT active_record_1
1184
+ SQL (0.2ms) INSERT INTO "marks_marks" ("created_at", "mark_type", "markable_id", "markable_type", "marker_id", "marker_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00], ["mark_type", "Nice"], ["markable_id", 1], ["markable_type", "Reply"], ["marker_id", 1], ["marker_type", "User"], ["updated_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00]]
1185
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1186
+  (0.0ms) SAVEPOINT active_record_1
1187
+ SQL (0.2ms) INSERT INTO "marks_marks" ("created_at", "mark_type", "markable_id", "markable_type", "marker_id", "marker_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00], ["mark_type", "Nice"], ["markable_id", 1], ["markable_type", "Reply"], ["marker_id", 1], ["marker_type", "User"], ["updated_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00]]
1188
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1189
+ User Load (0.2ms) SELECT "users".* FROM "users" INNER JOIN "marks_marks" ON "marks_marks"."marker_id" = "users"."id" AND "marks_marks"."marker_type" = 'User' WHERE (marks_marks.mark_type = 'Nice' AND markable_type = 'Reply' AND markable_id = 1)
1190
+  (1.0ms) rollback transaction
1191
+  (0.0ms) begin transaction
1192
+  (0.0ms) SAVEPOINT active_record_1
1193
+ SQL (0.4ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00]]
1194
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1195
+  (0.0ms) SAVEPOINT active_record_1
1196
+ SQL (0.4ms) INSERT INTO "replies" ("created_at", "updated_at") VALUES (?, ?) [["created_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00], ["updated_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00]]
1197
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1198
+  (0.2ms) SELECT COUNT(*) FROM "marks_marks" WHERE "marks_marks"."marker_id" = 1 AND "marks_marks"."marker_type" = 'User' AND "marks_marks"."mark_type" = 'Nice' AND "marks_marks"."markable_type" = 'Reply' AND "marks_marks"."markable_id" = 1
1199
+  (0.1ms) SAVEPOINT active_record_1
1200
+ SQL (0.3ms) INSERT INTO "marks_marks" ("created_at", "mark_type", "markable_id", "markable_type", "marker_id", "marker_type", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00], ["mark_type", "Nice"], ["markable_id", 1], ["markable_type", "Reply"], ["marker_id", 1], ["marker_type", "User"], ["updated_at", Mon, 19 Nov 2012 12:59:10 UTC +00:00]]
1201
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1202
+  (0.1ms) SELECT COUNT(*) FROM "marks_marks" WHERE "marks_marks"."marker_id" = 1 AND "marks_marks"."marker_type" = 'User' AND "marks_marks"."mark_type" = 'Nice' AND "marks_marks"."markable_type" = 'Reply' AND "marks_marks"."markable_id" = 1
1203
+  (1.0ms) rollback transaction
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: marks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-17 00:00:00.000000000 Z
12
+ date: 2012-11-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -115,7 +115,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
115
115
  version: '0'
116
116
  segments:
117
117
  - 0
118
- hash: 2488921714343065867
118
+ hash: -356722490955600964
119
119
  required_rubygems_version: !ruby/object:Gem::Requirement
120
120
  none: false
121
121
  requirements:
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
124
  version: '0'
125
125
  segments:
126
126
  - 0
127
- hash: 2488921714343065867
127
+ hash: -356722490955600964
128
128
  requirements: []
129
129
  rubyforge_project:
130
130
  rubygems_version: 1.8.23