fun_with_json_api 0.0.11 → 0.0.11.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1328b91ef284a304fd92db41e7a2aadb2a095e2a
4
- data.tar.gz: 0f457c751fa862274f6a164bc0f4a99896e99bb8
3
+ metadata.gz: 05cbf38e18560ec293a607cc3b4a02e114c22504
4
+ data.tar.gz: 5f4629bc9fb0a821cb0b76a4a9a937ba20eea436
5
5
  SHA512:
6
- metadata.gz: 2901cbad60ecfb0558f25561f00953f99b898930e9812f28ee71e6984b7abb49bbecc96747451485b88923edc3696edf84a381dccfb52c0912c3aae759b205a0
7
- data.tar.gz: 3c1a3fec849e9b3a93a030c3c6d767f21ff3e37c62efbb9dc8b8375276a4ad811c66f8732d3286b5972f9c013718f75da9511385e77eeb5c7c69bd883fc6d01a
6
+ metadata.gz: 8bb4d3284563f5a06534f09962610e4256461a16996510171df907a273863180336b620576bd894068b1bfeaf4c6c28558296abffd675df64751e384f0e1f0c8
7
+ data.tar.gz: 4d9c2642e3848d083228e42e59643ee7833561522f05f9f551f80b9395512d87720658e0b57493e845a101965feb86e17bb17857eefe09046a84fcffdb6b7dd4
@@ -1,6 +1,8 @@
1
1
  module FunWithJsonApi
2
2
  module Middleware
3
3
  class CatchJsonApiParseErrors
4
+ JSON_API_REGEX = %r{application\/vnd\.api\+json}
5
+
4
6
  def initialize(app)
5
7
  @app = app
6
8
  end
@@ -8,7 +10,7 @@ module FunWithJsonApi
8
10
  def call(env)
9
11
  @app.call(env)
10
12
  rescue ActionDispatch::ParamsParser::ParseError => error
11
- if env['CONTENT_TYPE'] == FunWithJsonApi::MEDIA_TYPE && respond_with_json_api_error?(env)
13
+ if env['CONTENT_TYPE'] =~ JSON_API_REGEX && respond_with_json_api_error?(env)
12
14
  build_json_api_parse_error_response
13
15
  else
14
16
  raise error
@@ -29,7 +31,7 @@ module FunWithJsonApi
29
31
 
30
32
  def respond_with_json_api_error?(env)
31
33
  FunWithJsonApi.configuration.force_render_parse_errors_as_json_api? ||
32
- env['HTTP_ACCEPT'] =~ %r{application\/vnd\.api\+json}
34
+ env['HTTP_ACCEPT'] =~ JSON_API_REGEX
33
35
  end
34
36
  end
35
37
  end
@@ -1,3 +1,3 @@
1
1
  module FunWithJsonApi
2
- VERSION = '0.0.11'.freeze
2
+ VERSION = '0.0.11.1'.freeze
3
3
  end
@@ -381972,3 +381972,1137 @@ Unable to determine type for anonymous Deserializer
381972
381972
   (0.0ms) rollback transaction
381973
381973
   (0.0ms) begin transaction
381974
381974
   (0.0ms) rollback transaction
381975
+  (0.2ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar, "body" text, "author_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
381976
+  (0.1ms) CREATE TABLE "authors" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "code" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
381977
+  (0.1ms) CREATE TABLE "comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "contents" text, "author_id" integer, "post_id" integer) 
381978
+  (0.1ms) begin transaction
381979
+  (0.1ms) rollback transaction
381980
+  (0.1ms) begin transaction
381981
+  (0.1ms) rollback transaction
381982
+  (0.1ms) begin transaction
381983
+  (0.0ms) SAVEPOINT active_record_1
381984
+ SQL (0.2ms) INSERT INTO "authors" ("id", "created_at", "updated_at") VALUES (?, ?, ?) [["id", 42], ["created_at", "2016-04-23 04:52:45.399238"], ["updated_at", "2016-04-23 04:52:45.399238"]]
381985
+  (0.0ms) RELEASE SAVEPOINT active_record_1
381986
+  (0.0ms) SAVEPOINT active_record_1
381987
+ SQL (0.0ms) INSERT INTO "authors" ("id", "created_at", "updated_at") VALUES (?, ?, ?) [["id", 43], ["created_at", "2016-04-23 04:52:45.402672"], ["updated_at", "2016-04-23 04:52:45.402672"]]
381988
+  (0.0ms) RELEASE SAVEPOINT active_record_1
381989
+  (0.2ms) SELECT COUNT(*) FROM "authors" WHERE "authors"."id" IN (42, 43)
381990
+ ARModels::Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."id" IN (42, 43)
381991
+  (0.1ms) rollback transaction
381992
+  (0.1ms) begin transaction
381993
+  (0.0ms) SAVEPOINT active_record_1
381994
+ SQL (0.1ms) INSERT INTO "authors" ("id", "name", "code", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 42], ["name", "Jack"], ["code", "foo"], ["created_at", "2016-04-23 04:52:45.410998"], ["updated_at", "2016-04-23 04:52:45.410998"]]
381995
+  (0.0ms) RELEASE SAVEPOINT active_record_1
381996
+  (0.0ms) SAVEPOINT active_record_1
381997
+ SQL (0.1ms) INSERT INTO "authors" ("id", "name", "code", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 43], ["name", "John"], ["code", "foo"], ["created_at", "2016-04-23 04:52:45.412446"], ["updated_at", "2016-04-23 04:52:45.412446"]]
381998
+  (0.1ms) RELEASE SAVEPOINT active_record_1
381999
+  (0.0ms) SAVEPOINT active_record_1
382000
+ SQL (0.1ms) INSERT INTO "authors" ("id", "name", "code", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 44], ["name", "Jack"], ["code", "bar"], ["created_at", "2016-04-23 04:52:45.413658"], ["updated_at", "2016-04-23 04:52:45.413658"]]
382001
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382002
+  (0.1ms) SELECT COUNT(*) FROM "authors" WHERE "authors"."name" = ? AND "authors"."code" IN ('foo', 'bar') [["name", "Jack"]]
382003
+ ARModels::Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."name" = ? AND "authors"."code" IN ('foo', 'bar') [["name", "Jack"]]
382004
+  (0.0ms) rollback transaction
382005
+  (0.1ms) begin transaction
382006
+  (0.1ms) SAVEPOINT active_record_1
382007
+ SQL (0.1ms) INSERT INTO "posts" ("id", "created_at", "updated_at") VALUES (?, ?, ?) [["id", 1], ["created_at", "2016-04-23 04:52:45.428135"], ["updated_at", "2016-04-23 04:52:45.428135"]]
382008
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382009
+  (0.0ms) SAVEPOINT active_record_1
382010
+ SQL (0.1ms) INSERT INTO "authors" ("id", "created_at", "updated_at") VALUES (?, ?, ?) [["id", 9], ["created_at", "2016-04-23 04:52:45.430551"], ["updated_at", "2016-04-23 04:52:45.430551"]]
382011
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382012
+  (0.1ms) SAVEPOINT active_record_1
382013
+ SQL (0.1ms) INSERT INTO "comments" ("id") VALUES (?) [["id", 5]]
382014
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382015
+  (0.0ms) SAVEPOINT active_record_1
382016
+ SQL (0.1ms) INSERT INTO "comments" ("id") VALUES (?) [["id", 12]]
382017
+  (0.1ms) RELEASE SAVEPOINT active_record_1
382018
+  (0.2ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."id" IN (5, 12)
382019
+ ARModels::Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" IN (5, 12)
382020
+ ARModels::Comment Load (0.1ms) SELECT "comments"."id" FROM "comments" WHERE "comments"."id" IN (5, 12)
382021
+ ARModels::Author Load (0.6ms) SELECT "authors".* FROM "authors" WHERE "authors"."id" = ? LIMIT 1 [["id", 9]]
382022
+  (0.1ms) rollback transaction
382023
+  (0.1ms) begin transaction
382024
+  (0.0ms) SAVEPOINT active_record_1
382025
+ SQL (0.1ms) INSERT INTO "posts" ("id", "created_at", "updated_at") VALUES (?, ?, ?) [["id", 1], ["created_at", "2016-04-23 04:52:45.491140"], ["updated_at", "2016-04-23 04:52:45.491140"]]
382026
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382027
+  (0.0ms) SAVEPOINT active_record_1
382028
+ SQL (0.1ms) INSERT INTO "authors" ("id", "name", "code", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 9], ["name", "John"], ["code", "foo"], ["created_at", "2016-04-23 04:52:45.492966"], ["updated_at", "2016-04-23 04:52:45.492966"]]
382029
+  (0.1ms) RELEASE SAVEPOINT active_record_1
382030
+  (0.0ms) SAVEPOINT active_record_1
382031
+ SQL (0.1ms) INSERT INTO "authors" ("id", "name", "code", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 10], ["name", "John"], ["code", "bar"], ["created_at", "2016-04-23 04:52:45.494701"], ["updated_at", "2016-04-23 04:52:45.494701"]]
382032
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382033
+  (0.0ms) SAVEPOINT active_record_1
382034
+ SQL (0.0ms) INSERT INTO "comments" ("id") VALUES (?) [["id", 5]]
382035
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382036
+  (0.0ms) SAVEPOINT active_record_1
382037
+ SQL (0.0ms) INSERT INTO "comments" ("id") VALUES (?) [["id", 12]]
382038
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382039
+  (0.2ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."id" IN (5, 12)
382040
+ ARModels::Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" IN (5, 12)
382041
+ ARModels::Comment Load (0.1ms) SELECT "comments"."id" FROM "comments" WHERE "comments"."id" IN (5, 12)
382042
+ ARModels::Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."code" = ? AND "authors"."name" = ? LIMIT 1 [["code", "foo"], ["name", "John"]]
382043
+  (0.1ms) rollback transaction
382044
+  (0.1ms) begin transaction
382045
+  (0.1ms) SAVEPOINT active_record_1
382046
+ SQL (0.1ms) INSERT INTO "posts" ("id", "created_at", "updated_at") VALUES (?, ?, ?) [["id", 1], ["created_at", "2016-04-23 04:52:45.505725"], ["updated_at", "2016-04-23 04:52:45.505725"]]
382047
+  (0.2ms) RELEASE SAVEPOINT active_record_1
382048
+  (0.0ms) SAVEPOINT active_record_1
382049
+ SQL (0.4ms) INSERT INTO "authors" ("id", "created_at", "updated_at") VALUES (?, ?, ?) [["id", 9], ["created_at", "2016-04-23 04:52:45.507415"], ["updated_at", "2016-04-23 04:52:45.507415"]]
382050
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382051
+ ARModels::Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."id" = ? LIMIT 1 [["id", 9]]
382052
+  (0.1ms) rollback transaction
382053
+  (0.1ms) begin transaction
382054
+  (0.0ms) SAVEPOINT active_record_1
382055
+ SQL (0.1ms) INSERT INTO "authors" ("id", "created_at", "updated_at") VALUES (?, ?, ?) [["id", 9], ["created_at", "2016-04-23 04:52:45.893617"], ["updated_at", "2016-04-23 04:52:45.893617"]]
382056
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382057
+  (0.0ms) SAVEPOINT active_record_1
382058
+ SQL (0.0ms) INSERT INTO "comments" ("id") VALUES (?) [["id", 5]]
382059
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382060
+  (0.0ms) SAVEPOINT active_record_1
382061
+ SQL (0.0ms) INSERT INTO "comments" ("id") VALUES (?) [["id", 12]]
382062
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382063
+  (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."id" IN (5, 12)
382064
+ ARModels::Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" IN (5, 12)
382065
+ ARModels::Comment Load (0.3ms) SELECT "comments"."id" FROM "comments" WHERE "comments"."id" IN (5, 12)
382066
+ ARModels::Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."id" = ? LIMIT 1 [["id", 9]]
382067
+  (0.1ms) rollback transaction
382068
+  (0.1ms) begin transaction
382069
+  (0.0ms) SAVEPOINT active_record_1
382070
+ SQL (0.1ms) INSERT INTO "posts" ("id", "created_at", "updated_at") VALUES (?, ?, ?) [["id", 1], ["created_at", "2016-04-23 04:52:45.901405"], ["updated_at", "2016-04-23 04:52:45.901405"]]
382071
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382072
+  (0.0ms) SAVEPOINT active_record_1
382073
+ SQL (0.0ms) INSERT INTO "authors" ("id", "created_at", "updated_at") VALUES (?, ?, ?) [["id", 9], ["created_at", "2016-04-23 04:52:45.902794"], ["updated_at", "2016-04-23 04:52:45.902794"]]
382074
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382075
+  (0.0ms) SAVEPOINT active_record_1
382076
+ SQL (0.1ms) INSERT INTO "comments" ("id", "contents") VALUES (?, ?) [["id", 5], ["contents", "Blargh"]]
382077
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382078
+  (0.0ms) SAVEPOINT active_record_1
382079
+ SQL (0.0ms) INSERT INTO "comments" ("id", "contents") VALUES (?, ?) [["id", 12], ["contents", "Foobar"]]
382080
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382081
+  (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."id" IN (5, 12)
382082
+ ARModels::Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" IN (5, 12)
382083
+  (0.1ms) rollback transaction
382084
+  (0.0ms) begin transaction
382085
+  (0.0ms) SAVEPOINT active_record_1
382086
+ SQL (0.1ms) INSERT INTO "authors" ("id", "created_at", "updated_at") VALUES (?, ?, ?) [["id", 42], ["created_at", "2016-04-23 04:52:45.909631"], ["updated_at", "2016-04-23 04:52:45.909631"]]
382087
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382088
+ ARModels::Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE "authors"."id" = ? LIMIT 1 [["id", 42]]
382089
+  (0.0ms) rollback transaction
382090
+  (0.1ms) begin transaction
382091
+  (0.0ms) SAVEPOINT active_record_1
382092
+ SQL (0.1ms) INSERT INTO "authors" ("id", "name", "code", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 42], ["name", "Jack"], ["code", "foo"], ["created_at", "2016-04-23 04:52:45.912332"], ["updated_at", "2016-04-23 04:52:45.912332"]]
382093
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382094
+  (0.0ms) SAVEPOINT active_record_1
382095
+ SQL (0.0ms) INSERT INTO "authors" ("id", "name", "code", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 43], ["name", "John"], ["code", "foo"], ["created_at", "2016-04-23 04:52:45.913657"], ["updated_at", "2016-04-23 04:52:45.913657"]]
382096
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382097
+ ARModels::Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."name" = ? AND "authors"."code" = ? LIMIT 1 [["name", "Jack"], ["code", "foo"]]
382098
+  (0.0ms) rollback transaction
382099
+  (0.1ms) begin transaction
382100
+  (0.0ms) rollback transaction
382101
+  (0.1ms) begin transaction
382102
+  (0.0ms) rollback transaction
382103
+  (0.0ms) begin transaction
382104
+  (0.0ms) rollback transaction
382105
+  (0.0ms) begin transaction
382106
+  (0.0ms) rollback transaction
382107
+  (0.0ms) begin transaction
382108
+  (0.1ms) rollback transaction
382109
+  (0.1ms) begin transaction
382110
+  (0.1ms) rollback transaction
382111
+  (0.1ms) begin transaction
382112
+  (0.0ms) rollback transaction
382113
+  (0.1ms) begin transaction
382114
+  (0.0ms) rollback transaction
382115
+  (0.0ms) begin transaction
382116
+  (0.0ms) rollback transaction
382117
+  (0.0ms) begin transaction
382118
+  (0.1ms) rollback transaction
382119
+  (0.0ms) begin transaction
382120
+  (0.0ms) rollback transaction
382121
+  (0.1ms) begin transaction
382122
+  (0.0ms) rollback transaction
382123
+  (0.0ms) begin transaction
382124
+  (0.0ms) rollback transaction
382125
+  (0.0ms) begin transaction
382126
+  (0.0ms) rollback transaction
382127
+  (0.0ms) begin transaction
382128
+  (0.0ms) rollback transaction
382129
+  (0.1ms) begin transaction
382130
+  (0.0ms) rollback transaction
382131
+  (0.0ms) begin transaction
382132
+ Unable to determine type for anonymous Deserializer
382133
+ Unable to determine type for anonymous Deserializer
382134
+  (0.1ms) rollback transaction
382135
+  (0.2ms) begin transaction
382136
+  (0.0ms) rollback transaction
382137
+  (0.1ms) begin transaction
382138
+ Unable to determine type for anonymous Deserializer
382139
+ Unable to determine type for anonymous Deserializer
382140
+  (0.1ms) rollback transaction
382141
+  (0.1ms) begin transaction
382142
+  (0.0ms) rollback transaction
382143
+  (0.1ms) begin transaction
382144
+  (0.0ms) rollback transaction
382145
+  (0.0ms) begin transaction
382146
+  (0.0ms) rollback transaction
382147
+  (0.1ms) begin transaction
382148
+  (0.0ms) rollback transaction
382149
+  (0.0ms) begin transaction
382150
+  (0.1ms) rollback transaction
382151
+  (0.1ms) begin transaction
382152
+  (0.0ms) rollback transaction
382153
+  (0.0ms) begin transaction
382154
+ Unable to determine type for anonymous Deserializer
382155
+  (0.1ms) rollback transaction
382156
+  (0.1ms) begin transaction
382157
+ Unable to determine type for anonymous Deserializer
382158
+  (0.1ms) rollback transaction
382159
+  (0.1ms) begin transaction
382160
+ Unable to determine type for anonymous Deserializer
382161
+  (0.1ms) rollback transaction
382162
+  (0.1ms) begin transaction
382163
+ Unable to determine type for anonymous Deserializer
382164
+  (0.1ms) rollback transaction
382165
+  (0.1ms) begin transaction
382166
+ Unable to determine type for anonymous Deserializer
382167
+  (0.1ms) rollback transaction
382168
+  (0.1ms) begin transaction
382169
+ Unable to determine type for anonymous Deserializer
382170
+  (0.0ms) rollback transaction
382171
+  (0.1ms) begin transaction
382172
+ Unable to determine type for anonymous Deserializer
382173
+  (0.1ms) rollback transaction
382174
+  (0.1ms) begin transaction
382175
+ Unable to determine type for anonymous Deserializer
382176
+  (0.1ms) rollback transaction
382177
+  (0.1ms) begin transaction
382178
+ Unable to determine type for anonymous Deserializer
382179
+  (0.1ms) rollback transaction
382180
+  (0.1ms) begin transaction
382181
+ Unable to determine type for anonymous Deserializer
382182
+  (0.1ms) rollback transaction
382183
+  (0.1ms) begin transaction
382184
+ Unable to determine type for anonymous Deserializer
382185
+  (0.1ms) rollback transaction
382186
+  (0.1ms) begin transaction
382187
+ Unable to determine type for anonymous Deserializer
382188
+  (0.1ms) rollback transaction
382189
+  (0.1ms) begin transaction
382190
+ Unable to determine type for anonymous Deserializer
382191
+  (0.1ms) rollback transaction
382192
+  (0.0ms) begin transaction
382193
+  (0.0ms) rollback transaction
382194
+  (0.1ms) begin transaction
382195
+  (0.1ms) rollback transaction
382196
+  (0.1ms) begin transaction
382197
+  (0.0ms) rollback transaction
382198
+  (0.1ms) begin transaction
382199
+  (0.1ms) rollback transaction
382200
+  (0.1ms) begin transaction
382201
+  (0.1ms) rollback transaction
382202
+  (0.1ms) begin transaction
382203
+  (0.1ms) rollback transaction
382204
+  (0.1ms) begin transaction
382205
+  (0.1ms) rollback transaction
382206
+  (0.0ms) begin transaction
382207
+  (0.0ms) rollback transaction
382208
+  (0.0ms) begin transaction
382209
+  (0.1ms) rollback transaction
382210
+  (0.2ms) begin transaction
382211
+  (0.1ms) rollback transaction
382212
+  (0.1ms) begin transaction
382213
+  (0.1ms) rollback transaction
382214
+  (0.1ms) begin transaction
382215
+  (0.1ms) rollback transaction
382216
+  (0.1ms) begin transaction
382217
+  (0.1ms) rollback transaction
382218
+  (0.1ms) begin transaction
382219
+  (0.1ms) rollback transaction
382220
+  (0.1ms) begin transaction
382221
+  (0.1ms) rollback transaction
382222
+  (0.0ms) begin transaction
382223
+  (0.1ms) rollback transaction
382224
+  (0.1ms) begin transaction
382225
+  (0.0ms) rollback transaction
382226
+  (0.1ms) begin transaction
382227
+  (0.1ms) rollback transaction
382228
+  (0.1ms) begin transaction
382229
+  (0.1ms) rollback transaction
382230
+  (0.1ms) begin transaction
382231
+  (0.0ms) rollback transaction
382232
+  (0.1ms) begin transaction
382233
+  (0.0ms) rollback transaction
382234
+  (0.1ms) begin transaction
382235
+  (0.1ms) rollback transaction
382236
+  (0.1ms) begin transaction
382237
+  (0.1ms) rollback transaction
382238
+  (0.1ms) begin transaction
382239
+  (0.1ms) rollback transaction
382240
+  (0.1ms) begin transaction
382241
+ Processing by AnonymousController#index as HTML
382242
+ [active_model_serializers] Rendered FunWithJsonApi::ExceptionSerializer with ActiveModelSerializers::Adapter::Json (0.44ms)
382243
+ Completed 403 Forbidden in 1ms (Views: 0.9ms | ActiveRecord: 0.0ms)
382244
+  (0.1ms) rollback transaction
382245
+  (0.1ms) begin transaction
382246
+ Processing by AnonymousController#index as HTML
382247
+ [active_model_serializers] Rendered FunWithJsonApi::ExceptionSerializer with ActiveModelSerializers::Adapter::Json (0.33ms)
382248
+ Completed 403 Forbidden in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)
382249
+  (0.1ms) rollback transaction
382250
+  (0.1ms) begin transaction
382251
+ Processing by AnonymousController#index as HTML
382252
+ [active_model_serializers] Rendered FunWithJsonApi::ExceptionSerializer with ActiveModelSerializers::Adapter::Json (0.33ms)
382253
+ Completed 403 Forbidden in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)
382254
+  (0.1ms) rollback transaction
382255
+  (0.1ms) begin transaction
382256
+ Processing by AnonymousController#index as HTML
382257
+ [active_model_serializers] Rendered FunWithJsonApi::ExceptionSerializer with ActiveModelSerializers::Adapter::Json (0.36ms)
382258
+ Completed 403 Forbidden in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)
382259
+  (0.1ms) rollback transaction
382260
+  (0.1ms) begin transaction
382261
+ Processing by AnonymousController#index as HTML
382262
+ [active_model_serializers] Rendered FunWithJsonApi::ExceptionSerializer with ActiveModelSerializers::Adapter::Json (0.44ms)
382263
+ Completed 422 Unprocessable Entity in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)
382264
+  (0.1ms) rollback transaction
382265
+  (0.1ms) begin transaction
382266
+ Processing by AnonymousController#index as HTML
382267
+ [active_model_serializers] Rendered FunWithJsonApi::ExceptionSerializer with ActiveModelSerializers::Adapter::Json (0.26ms)
382268
+ Completed 422 Unprocessable Entity in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
382269
+  (0.1ms) rollback transaction
382270
+  (0.1ms) begin transaction
382271
+ Started POST "/echo" for 127.0.0.1 at 2016-04-23 14:52:46 +1000
382272
+ Processing by ApplicationController#echo as JSON_API
382273
+ Parameters: {"data"=>{"id"=>"42", "type"=>"foobar"}}
382274
+ [active_model_serializers] Rendered ActiveModel::Serializer::Null with ActionController::Parameters (0.2ms)
382275
+ Completed 200 OK in 14ms (Views: 13.7ms | ActiveRecord: 0.0ms)
382276
+  (0.1ms) rollback transaction
382277
+  (0.1ms) begin transaction
382278
+ Started POST "/echo" for 127.0.0.1 at 2016-04-23 14:52:46 +1000
382279
+ Error occurred while parsing request parameters.
382280
+ Contents:
382281
+
382282
+ {"data":{"id":"42","type":"foobar",}}
382283
+  (0.1ms) rollback transaction
382284
+  (0.1ms) begin transaction
382285
+ Started POST "/echo" for 127.0.0.1 at 2016-04-23 14:52:46 +1000
382286
+ Error occurred while parsing request parameters.
382287
+ Contents:
382288
+
382289
+ {"data":{"id":"42","type":"foobar",}}
382290
+  (0.1ms) rollback transaction
382291
+  (0.1ms) begin transaction
382292
+ Started POST "/echo" for 127.0.0.1 at 2016-04-23 14:52:46 +1000
382293
+ Error occurred while parsing request parameters.
382294
+ Contents:
382295
+
382296
+ {"data":{"id":"42","type":"foobar",}}
382297
+  (0.1ms) rollback transaction
382298
+  (0.1ms) begin transaction
382299
+ Started POST "/echo" for 127.0.0.1 at 2016-04-23 14:52:46 +1000
382300
+ Error occurred while parsing request parameters.
382301
+ Contents:
382302
+
382303
+ {"data":{"id":"42","type":"foobar",}}
382304
+  (0.1ms) rollback transaction
382305
+  (0.1ms) begin transaction
382306
+ Started POST "/echo" for 127.0.0.1 at 2016-04-23 14:52:46 +1000
382307
+ Error occurred while parsing request parameters.
382308
+ Contents:
382309
+
382310
+ {"data":{"id":"42","type":"foobar",}}
382311
+  (0.1ms) rollback transaction
382312
+  (0.1ms) begin transaction
382313
+  (0.0ms) rollback transaction
382314
+  (0.0ms) begin transaction
382315
+  (0.1ms) rollback transaction
382316
+  (0.0ms) begin transaction
382317
+  (0.0ms) rollback transaction
382318
+  (0.1ms) begin transaction
382319
+  (0.0ms) rollback transaction
382320
+  (0.0ms) begin transaction
382321
+  (0.0ms) rollback transaction
382322
+  (0.1ms) begin transaction
382323
+  (0.1ms) rollback transaction
382324
+  (0.0ms) begin transaction
382325
+  (0.0ms) rollback transaction
382326
+  (0.0ms) begin transaction
382327
+  (0.0ms) rollback transaction
382328
+  (0.0ms) begin transaction
382329
+  (0.0ms) rollback transaction
382330
+  (0.0ms) begin transaction
382331
+  (0.0ms) rollback transaction
382332
+  (0.0ms) begin transaction
382333
+  (0.0ms) rollback transaction
382334
+  (0.0ms) begin transaction
382335
+ Unable to determine type for anonymous Deserializer
382336
+  (0.1ms) rollback transaction
382337
+  (0.0ms) begin transaction
382338
+ Unable to determine type for anonymous Deserializer
382339
+  (0.0ms) rollback transaction
382340
+  (0.0ms) begin transaction
382341
+ Unable to determine type for anonymous Deserializer
382342
+  (0.1ms) rollback transaction
382343
+  (0.0ms) begin transaction
382344
+ Unable to determine type for anonymous Deserializer
382345
+  (0.1ms) rollback transaction
382346
+  (0.1ms) begin transaction
382347
+ Unable to determine type for anonymous Deserializer
382348
+  (0.1ms) rollback transaction
382349
+  (0.1ms) begin transaction
382350
+ Unable to determine type for anonymous Deserializer
382351
+  (0.1ms) rollback transaction
382352
+  (0.1ms) begin transaction
382353
+ Unable to determine type for anonymous Deserializer
382354
+  (0.1ms) SELECT COUNT(*) FROM "authors" WHERE "authors"."code" IN ('foobar', 'blargh')
382355
+ ARModels::Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."code" IN ('foobar', 'blargh')
382356
+  (0.0ms) rollback transaction
382357
+  (0.1ms) begin transaction
382358
+  (0.0ms) SAVEPOINT active_record_1
382359
+ SQL (0.2ms) INSERT INTO "authors" ("id", "code", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["id", 1], ["code", "foobar"], ["created_at", "2016-04-23 04:52:46.187914"], ["updated_at", "2016-04-23 04:52:46.187914"]]
382360
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382361
+ Unable to determine type for anonymous Deserializer
382362
+  (0.1ms) SELECT COUNT(*) FROM "authors" WHERE "authors"."code" IN ('foobar', 'blargh')
382363
+ ARModels::Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."code" IN ('foobar', 'blargh')
382364
+  (0.1ms) rollback transaction
382365
+  (0.1ms) begin transaction
382366
+  (0.0ms) SAVEPOINT active_record_1
382367
+ SQL (0.1ms) INSERT INTO "authors" ("id", "code", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["id", 1], ["code", "foobar"], ["created_at", "2016-04-23 04:52:46.193858"], ["updated_at", "2016-04-23 04:52:46.193858"]]
382368
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382369
+  (0.0ms) SAVEPOINT active_record_1
382370
+ SQL (0.1ms) INSERT INTO "authors" ("id", "code", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["id", 2], ["code", "blargh"], ["created_at", "2016-04-23 04:52:46.195205"], ["updated_at", "2016-04-23 04:52:46.195205"]]
382371
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382372
+ Unable to determine type for anonymous Deserializer
382373
+  (0.1ms) SELECT COUNT(*) FROM "authors" WHERE "authors"."code" IN ('foobar', 'blargh')
382374
+ ARModels::Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."code" IN ('foobar', 'blargh')
382375
+  (0.1ms) rollback transaction
382376
+  (0.0ms) begin transaction
382377
+  (0.0ms) SAVEPOINT active_record_1
382378
+ SQL (0.1ms) INSERT INTO "authors" ("id", "code", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["id", 1], ["code", "foobar"], ["created_at", "2016-04-23 04:52:46.202019"], ["updated_at", "2016-04-23 04:52:46.202019"]]
382379
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382380
+  (0.0ms) SAVEPOINT active_record_1
382381
+ SQL (0.0ms) INSERT INTO "authors" ("id", "code", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["id", 2], ["code", "blargh"], ["created_at", "2016-04-23 04:52:46.203568"], ["updated_at", "2016-04-23 04:52:46.203568"]]
382382
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382383
+ Unable to determine type for anonymous Deserializer
382384
+  (0.1ms) SELECT COUNT(*) FROM "authors" WHERE "authors"."code" IN ('foobar', 'blargh')
382385
+ ARModels::Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."code" IN ('foobar', 'blargh')
382386
+ ARModels::Author Load (0.1ms) SELECT "authors"."id" FROM "authors" WHERE "authors"."code" IN ('foobar', 'blargh')
382387
+  (0.0ms) rollback transaction
382388
+  (0.1ms) begin transaction
382389
+ Unable to determine type for anonymous Deserializer
382390
+  (0.2ms) rollback transaction
382391
+  (0.2ms) begin transaction
382392
+ Unable to determine type for anonymous Deserializer
382393
+ ARModels::Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."code" = ? LIMIT 1 [["code", "foobar"]]
382394
+  (0.1ms) rollback transaction
382395
+  (0.1ms) begin transaction
382396
+  (0.0ms) SAVEPOINT active_record_1
382397
+ SQL (0.1ms) INSERT INTO "authors" ("id", "code", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["id", 1], ["code", "foobar"], ["created_at", "2016-04-23 04:52:46.216403"], ["updated_at", "2016-04-23 04:52:46.216403"]]
382398
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382399
+ Unable to determine type for anonymous Deserializer
382400
+ ARModels::Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE "authors"."code" = ? LIMIT 1 [["code", "foobar"]]
382401
+  (0.0ms) rollback transaction
382402
+  (0.0ms) begin transaction
382403
+  (0.0ms) rollback transaction
382404
+  (0.0ms) begin transaction
382405
+  (0.0ms) rollback transaction
382406
+  (0.1ms) begin transaction
382407
+ Unable to determine type for anonymous Deserializer
382408
+  (0.0ms) rollback transaction
382409
+  (0.1ms) begin transaction
382410
+ Unable to determine type for anonymous Deserializer
382411
+  (0.0ms) rollback transaction
382412
+  (0.0ms) begin transaction
382413
+ Unable to determine type for anonymous Deserializer
382414
+  (0.1ms) rollback transaction
382415
+  (0.0ms) begin transaction
382416
+ Unable to determine type for anonymous Deserializer
382417
+  (0.1ms) rollback transaction
382418
+  (0.1ms) begin transaction
382419
+ Unable to determine type for anonymous Deserializer
382420
+  (0.0ms) rollback transaction
382421
+  (0.1ms) begin transaction
382422
+ Unable to determine type for anonymous Deserializer
382423
+  (0.0ms) rollback transaction
382424
+  (0.1ms) begin transaction
382425
+ Unable to determine type for anonymous Deserializer
382426
+  (0.1ms) rollback transaction
382427
+  (0.1ms) begin transaction
382428
+ Unable to determine type for anonymous Deserializer
382429
+  (0.1ms) rollback transaction
382430
+  (0.1ms) begin transaction
382431
+ Unable to determine type for anonymous Deserializer
382432
+  (0.0ms) rollback transaction
382433
+  (0.1ms) begin transaction
382434
+ Unable to determine type for anonymous Deserializer
382435
+  (0.1ms) rollback transaction
382436
+  (0.1ms) begin transaction
382437
+ Unable to determine type for anonymous Deserializer
382438
+  (0.1ms) rollback transaction
382439
+  (0.0ms) begin transaction
382440
+ Unable to determine type for anonymous Deserializer
382441
+  (0.1ms) rollback transaction
382442
+  (0.0ms) begin transaction
382443
+ Unable to determine type for anonymous Deserializer
382444
+  (0.0ms) rollback transaction
382445
+  (0.1ms) begin transaction
382446
+ Unable to determine type for anonymous Deserializer
382447
+  (0.0ms) rollback transaction
382448
+  (0.0ms) begin transaction
382449
+ Unable to determine type for anonymous Deserializer
382450
+  (0.0ms) rollback transaction
382451
+  (0.0ms) begin transaction
382452
+ Unable to determine type for anonymous Deserializer
382453
+  (0.0ms) rollback transaction
382454
+  (0.2ms) begin transaction
382455
+ Unable to determine type for anonymous Deserializer
382456
+  (0.0ms) rollback transaction
382457
+  (0.1ms) begin transaction
382458
+ Unable to determine type for anonymous Deserializer
382459
+  (0.0ms) rollback transaction
382460
+  (0.0ms) begin transaction
382461
+ Unable to determine type for anonymous Deserializer
382462
+  (0.0ms) rollback transaction
382463
+  (0.1ms) begin transaction
382464
+ Unable to determine type for anonymous Deserializer
382465
+  (0.1ms) rollback transaction
382466
+  (0.1ms) begin transaction
382467
+ Unable to determine type for anonymous Deserializer
382468
+  (0.1ms) rollback transaction
382469
+  (0.1ms) begin transaction
382470
+ Unable to determine type for anonymous Deserializer
382471
+  (0.1ms) rollback transaction
382472
+  (0.1ms) begin transaction
382473
+ Unable to determine type for anonymous Deserializer
382474
+  (0.1ms) rollback transaction
382475
+  (0.1ms) begin transaction
382476
+ Unable to determine type for anonymous Deserializer
382477
+  (0.1ms) rollback transaction
382478
+  (0.1ms) begin transaction
382479
+ Unable to determine type for anonymous Deserializer
382480
+  (0.0ms) rollback transaction
382481
+  (0.1ms) begin transaction
382482
+ Unable to determine type for anonymous Deserializer
382483
+  (0.1ms) rollback transaction
382484
+  (0.1ms) begin transaction
382485
+ Unable to determine type for anonymous Deserializer
382486
+  (0.1ms) rollback transaction
382487
+  (0.1ms) begin transaction
382488
+ Unable to determine type for anonymous Deserializer
382489
+  (0.1ms) rollback transaction
382490
+  (0.1ms) begin transaction
382491
+ Unable to determine type for anonymous Deserializer
382492
+  (0.1ms) rollback transaction
382493
+  (0.1ms) begin transaction
382494
+ Unable to determine type for anonymous Deserializer
382495
+  (0.1ms) rollback transaction
382496
+  (0.0ms) begin transaction
382497
+ Unable to determine type for anonymous Deserializer
382498
+  (0.1ms) rollback transaction
382499
+  (0.0ms) begin transaction
382500
+  (0.0ms) rollback transaction
382501
+  (0.1ms) begin transaction
382502
+ Processing by AnonymousController#index as HTML
382503
+ [active_model_serializers] Rendered ActiveModel::Serializer::Null with Hash (0.26ms)
382504
+ Completed 200 OK in 1ms (Views: 1.1ms | ActiveRecord: 0.0ms)
382505
+  (0.1ms) rollback transaction
382506
+  (0.1ms) begin transaction
382507
+ Processing by AnonymousController#index as HTML
382508
+ [active_model_serializers] ARModels::Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."author_id" = ? [["author_id", 42]]
382509
+ [active_model_serializers] Rendered ARModels::AuthorSerializer with ActiveModelSerializers::Adapter::JsonApi (27.92ms)
382510
+ Completed 200 OK in 29ms (Views: 28.2ms | ActiveRecord: 0.1ms)
382511
+  (0.1ms) rollback transaction
382512
+  (0.4ms) begin transaction
382513
+ Processing by AnonymousController#index as JSON_API
382514
+ Rendered text template (0.0ms)
382515
+ Completed 200 OK in 9ms (Views: 9.0ms | ActiveRecord: 0.0ms)
382516
+  (0.1ms) rollback transaction
382517
+  (0.1ms) begin transaction
382518
+ Processing by AnonymousController#index as JSON_API
382519
+ Rendered text template (0.0ms)
382520
+ Completed 200 OK in 0ms (Views: 0.3ms | ActiveRecord: 0.0ms)
382521
+  (0.2ms) rollback transaction
382522
+  (0.1ms) begin transaction
382523
+ Processing by AnonymousController#index as HTML
382524
+ Parameters: {"data"=>{"id"=>"42", "type"=>"foobar"}}
382525
+ Rendered text template (0.0ms)
382526
+ Completed 200 OK in 3ms (Views: 3.3ms | ActiveRecord: 0.0ms)
382527
+  (0.1ms) rollback transaction
382528
+  (0.1ms) begin transaction
382529
+  (0.1ms) rollback transaction
382530
+  (0.0ms) begin transaction
382531
+  (0.0ms) rollback transaction
382532
+  (0.1ms) begin transaction
382533
+  (0.1ms) rollback transaction
382534
+  (0.1ms) begin transaction
382535
+  (0.0ms) rollback transaction
382536
+  (0.1ms) begin transaction
382537
+  (0.0ms) rollback transaction
382538
+  (0.1ms) begin transaction
382539
+  (0.0ms) rollback transaction
382540
+  (0.1ms) begin transaction
382541
+  (0.0ms) rollback transaction
382542
+  (0.2ms) CREATE TABLE "posts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar, "body" text, "author_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
382543
+  (0.1ms) CREATE TABLE "authors" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "code" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
382544
+  (0.1ms) CREATE TABLE "comments" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "contents" text, "author_id" integer, "post_id" integer) 
382545
+  (0.1ms) begin transaction
382546
+  (0.0ms) rollback transaction
382547
+  (0.1ms) begin transaction
382548
+  (0.0ms) rollback transaction
382549
+  (0.1ms) begin transaction
382550
+ Processing by AnonymousController#index as HTML
382551
+ [active_model_serializers] Rendered FunWithJsonApi::ExceptionSerializer with ActiveModelSerializers::Adapter::Json (1.08ms)
382552
+ Completed 403 Forbidden in 5ms (Views: 4.6ms | ActiveRecord: 0.0ms)
382553
+  (0.1ms) rollback transaction
382554
+  (0.1ms) begin transaction
382555
+ Processing by AnonymousController#index as HTML
382556
+ [active_model_serializers] Rendered FunWithJsonApi::ExceptionSerializer with ActiveModelSerializers::Adapter::Json (0.29ms)
382557
+ Completed 403 Forbidden in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
382558
+  (0.1ms) rollback transaction
382559
+  (0.1ms) begin transaction
382560
+ Processing by AnonymousController#index as HTML
382561
+ [active_model_serializers] Rendered FunWithJsonApi::ExceptionSerializer with ActiveModelSerializers::Adapter::Json (0.23ms)
382562
+ Completed 422 Unprocessable Entity in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
382563
+  (0.1ms) rollback transaction
382564
+  (0.1ms) begin transaction
382565
+ Processing by AnonymousController#index as HTML
382566
+ [active_model_serializers] Rendered FunWithJsonApi::ExceptionSerializer with ActiveModelSerializers::Adapter::Json (0.27ms)
382567
+ Completed 422 Unprocessable Entity in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
382568
+  (0.1ms) rollback transaction
382569
+  (0.1ms) begin transaction
382570
+ Processing by AnonymousController#index as HTML
382571
+ [active_model_serializers] Rendered FunWithJsonApi::ExceptionSerializer with ActiveModelSerializers::Adapter::Json (0.34ms)
382572
+ Completed 403 Forbidden in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)
382573
+  (0.1ms) rollback transaction
382574
+  (0.1ms) begin transaction
382575
+ Processing by AnonymousController#index as HTML
382576
+ [active_model_serializers] Rendered FunWithJsonApi::ExceptionSerializer with ActiveModelSerializers::Adapter::Json (0.3ms)
382577
+ Completed 403 Forbidden in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)
382578
+  (0.1ms) rollback transaction
382579
+  (0.1ms) begin transaction
382580
+  (0.1ms) rollback transaction
382581
+  (0.1ms) begin transaction
382582
+  (0.0ms) rollback transaction
382583
+  (0.1ms) begin transaction
382584
+  (0.0ms) rollback transaction
382585
+  (0.1ms) begin transaction
382586
+  (0.0ms) rollback transaction
382587
+  (0.1ms) begin transaction
382588
+  (0.0ms) rollback transaction
382589
+  (0.0ms) begin transaction
382590
+  (0.0ms) rollback transaction
382591
+  (0.1ms) begin transaction
382592
+  (0.0ms) rollback transaction
382593
+  (0.0ms) begin transaction
382594
+  (0.0ms) rollback transaction
382595
+  (0.0ms) begin transaction
382596
+  (0.1ms) rollback transaction
382597
+  (0.1ms) begin transaction
382598
+  (0.0ms) rollback transaction
382599
+  (0.0ms) begin transaction
382600
+  (0.1ms) rollback transaction
382601
+  (0.1ms) begin transaction
382602
+  (0.1ms) rollback transaction
382603
+  (0.0ms) begin transaction
382604
+  (0.1ms) rollback transaction
382605
+  (0.1ms) begin transaction
382606
+  (0.0ms) rollback transaction
382607
+  (0.1ms) begin transaction
382608
+  (0.0ms) rollback transaction
382609
+  (0.1ms) begin transaction
382610
+  (0.0ms) rollback transaction
382611
+  (0.0ms) begin transaction
382612
+  (0.0ms) rollback transaction
382613
+  (0.1ms) begin transaction
382614
+  (0.0ms) rollback transaction
382615
+  (0.1ms) begin transaction
382616
+  (0.1ms) rollback transaction
382617
+  (0.1ms) begin transaction
382618
+  (0.1ms) rollback transaction
382619
+  (0.0ms) begin transaction
382620
+  (0.0ms) rollback transaction
382621
+  (0.1ms) begin transaction
382622
+  (0.1ms) rollback transaction
382623
+  (0.1ms) begin transaction
382624
+  (0.1ms) rollback transaction
382625
+  (0.1ms) begin transaction
382626
+  (0.0ms) rollback transaction
382627
+  (0.0ms) begin transaction
382628
+  (0.0ms) rollback transaction
382629
+  (0.2ms) begin transaction
382630
+  (0.1ms) rollback transaction
382631
+  (0.1ms) begin transaction
382632
+  (0.1ms) rollback transaction
382633
+  (0.1ms) begin transaction
382634
+  (0.1ms) rollback transaction
382635
+  (0.0ms) begin transaction
382636
+  (0.0ms) rollback transaction
382637
+  (0.1ms) begin transaction
382638
+  (0.1ms) rollback transaction
382639
+  (0.1ms) begin transaction
382640
+  (0.1ms) rollback transaction
382641
+  (0.1ms) begin transaction
382642
+  (0.0ms) rollback transaction
382643
+  (0.1ms) begin transaction
382644
+  (0.0ms) rollback transaction
382645
+  (0.0ms) begin transaction
382646
+  (0.1ms) rollback transaction
382647
+  (0.0ms) begin transaction
382648
+  (0.0ms) rollback transaction
382649
+  (0.0ms) begin transaction
382650
+  (0.0ms) rollback transaction
382651
+  (0.1ms) begin transaction
382652
+  (0.0ms) rollback transaction
382653
+  (0.0ms) begin transaction
382654
+  (0.2ms) rollback transaction
382655
+  (0.1ms) begin transaction
382656
+  (0.0ms) rollback transaction
382657
+  (0.1ms) begin transaction
382658
+  (0.1ms) rollback transaction
382659
+  (0.0ms) begin transaction
382660
+  (0.1ms) rollback transaction
382661
+  (0.1ms) begin transaction
382662
+ Processing by AnonymousController#index as HTML
382663
+ [active_model_serializers] ARModels::Post Load (0.1ms) SELECT "posts".* FROM "posts" WHERE "posts"."author_id" = ? [["author_id", 42]]
382664
+ [active_model_serializers] Rendered ARModels::AuthorSerializer with ActiveModelSerializers::Adapter::JsonApi (16.33ms)
382665
+ Completed 200 OK in 25ms (Views: 18.7ms | ActiveRecord: 0.5ms)
382666
+  (0.1ms) rollback transaction
382667
+  (0.1ms) begin transaction
382668
+ Processing by AnonymousController#index as HTML
382669
+ [active_model_serializers] Rendered ActiveModel::Serializer::Null with Hash (0.1ms)
382670
+ Completed 200 OK in 2ms (Views: 2.2ms | ActiveRecord: 0.0ms)
382671
+  (0.1ms) rollback transaction
382672
+  (0.1ms) begin transaction
382673
+ Processing by AnonymousController#index as JSON_API
382674
+ Rendered text template (0.0ms)
382675
+ Completed 200 OK in 7ms (Views: 7.0ms | ActiveRecord: 0.0ms)
382676
+  (0.1ms) rollback transaction
382677
+  (0.1ms) begin transaction
382678
+ Processing by AnonymousController#index as JSON_API
382679
+ Rendered text template (0.0ms)
382680
+ Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
382681
+  (0.1ms) rollback transaction
382682
+  (0.1ms) begin transaction
382683
+ Processing by AnonymousController#index as HTML
382684
+ Parameters: {"data"=>{"id"=>"42", "type"=>"foobar"}}
382685
+ Rendered text template (0.0ms)
382686
+ Completed 200 OK in 3ms (Views: 2.6ms | ActiveRecord: 0.0ms)
382687
+  (0.1ms) rollback transaction
382688
+  (0.0ms) begin transaction
382689
+  (0.0ms) rollback transaction
382690
+  (0.1ms) begin transaction
382691
+  (0.0ms) rollback transaction
382692
+  (0.1ms) begin transaction
382693
+  (0.0ms) rollback transaction
382694
+  (0.0ms) begin transaction
382695
+  (0.0ms) rollback transaction
382696
+  (0.1ms) begin transaction
382697
+  (0.0ms) rollback transaction
382698
+  (0.0ms) begin transaction
382699
+  (0.1ms) rollback transaction
382700
+  (0.1ms) begin transaction
382701
+  (0.0ms) rollback transaction
382702
+  (0.0ms) begin transaction
382703
+  (0.0ms) rollback transaction
382704
+  (0.0ms) begin transaction
382705
+  (0.0ms) rollback transaction
382706
+  (0.1ms) begin transaction
382707
+  (0.0ms) rollback transaction
382708
+  (0.0ms) begin transaction
382709
+  (0.0ms) rollback transaction
382710
+  (0.0ms) begin transaction
382711
+  (0.0ms) rollback transaction
382712
+  (0.1ms) begin transaction
382713
+  (0.0ms) rollback transaction
382714
+  (0.0ms) begin transaction
382715
+  (0.0ms) rollback transaction
382716
+  (0.0ms) begin transaction
382717
+  (0.0ms) rollback transaction
382718
+  (0.0ms) begin transaction
382719
+  (0.0ms) rollback transaction
382720
+  (0.1ms) begin transaction
382721
+  (0.0ms) rollback transaction
382722
+  (0.1ms) begin transaction
382723
+  (0.1ms) rollback transaction
382724
+  (0.1ms) begin transaction
382725
+  (0.0ms) rollback transaction
382726
+  (0.0ms) begin transaction
382727
+ Unable to determine type for anonymous Deserializer
382728
+  (0.1ms) rollback transaction
382729
+  (0.1ms) begin transaction
382730
+ Unable to determine type for anonymous Deserializer
382731
+  (0.1ms) rollback transaction
382732
+  (0.1ms) begin transaction
382733
+ Unable to determine type for anonymous Deserializer
382734
+  (0.1ms) rollback transaction
382735
+  (0.1ms) begin transaction
382736
+ Unable to determine type for anonymous Deserializer
382737
+  (0.1ms) rollback transaction
382738
+  (0.1ms) begin transaction
382739
+ Unable to determine type for anonymous Deserializer
382740
+  (0.1ms) rollback transaction
382741
+  (0.0ms) begin transaction
382742
+ Unable to determine type for anonymous Deserializer
382743
+  (0.1ms) rollback transaction
382744
+  (0.1ms) begin transaction
382745
+ Unable to determine type for anonymous Deserializer
382746
+  (0.1ms) rollback transaction
382747
+  (0.0ms) begin transaction
382748
+ Unable to determine type for anonymous Deserializer
382749
+  (0.1ms) rollback transaction
382750
+  (0.1ms) begin transaction
382751
+ Unable to determine type for anonymous Deserializer
382752
+  (0.1ms) rollback transaction
382753
+  (0.0ms) begin transaction
382754
+ Unable to determine type for anonymous Deserializer
382755
+  (0.1ms) rollback transaction
382756
+  (0.1ms) begin transaction
382757
+ Unable to determine type for anonymous Deserializer
382758
+  (0.1ms) rollback transaction
382759
+  (0.1ms) begin transaction
382760
+ Unable to determine type for anonymous Deserializer
382761
+  (0.1ms) rollback transaction
382762
+  (0.1ms) begin transaction
382763
+ Unable to determine type for anonymous Deserializer
382764
+  (0.1ms) rollback transaction
382765
+  (0.2ms) begin transaction
382766
+  (0.1ms) rollback transaction
382767
+  (0.1ms) begin transaction
382768
+  (0.0ms) SAVEPOINT active_record_1
382769
+ SQL (0.1ms) INSERT INTO "authors" ("id", "name", "code", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 42], ["name", "Jack"], ["code", "foo"], ["created_at", "2016-04-23 04:54:03.534309"], ["updated_at", "2016-04-23 04:54:03.534309"]]
382770
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382771
+  (0.0ms) SAVEPOINT active_record_1
382772
+ SQL (0.0ms) INSERT INTO "authors" ("id", "name", "code", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 43], ["name", "John"], ["code", "foo"], ["created_at", "2016-04-23 04:54:03.535971"], ["updated_at", "2016-04-23 04:54:03.535971"]]
382773
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382774
+ ARModels::Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."name" = ? AND "authors"."code" = ? LIMIT 1 [["name", "Jack"], ["code", "foo"]]
382775
+  (0.1ms) rollback transaction
382776
+  (0.1ms) begin transaction
382777
+  (0.0ms) SAVEPOINT active_record_1
382778
+ SQL (0.1ms) INSERT INTO "authors" ("id", "created_at", "updated_at") VALUES (?, ?, ?) [["id", 42], ["created_at", "2016-04-23 04:54:03.544398"], ["updated_at", "2016-04-23 04:54:03.544398"]]
382779
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382780
+ ARModels::Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."id" = ? LIMIT 1 [["id", 42]]
382781
+  (0.0ms) rollback transaction
382782
+  (0.1ms) begin transaction
382783
+  (0.0ms) SAVEPOINT active_record_1
382784
+ SQL (0.1ms) INSERT INTO "authors" ("id", "created_at", "updated_at") VALUES (?, ?, ?) [["id", 42], ["created_at", "2016-04-23 04:54:03.547699"], ["updated_at", "2016-04-23 04:54:03.547699"]]
382785
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382786
+  (0.0ms) SAVEPOINT active_record_1
382787
+ SQL (0.0ms) INSERT INTO "authors" ("id", "created_at", "updated_at") VALUES (?, ?, ?) [["id", 43], ["created_at", "2016-04-23 04:54:03.548878"], ["updated_at", "2016-04-23 04:54:03.548878"]]
382788
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382789
+  (0.1ms) SELECT COUNT(*) FROM "authors" WHERE "authors"."id" IN (42, 43)
382790
+ ARModels::Author Load (0.2ms) SELECT "authors".* FROM "authors" WHERE "authors"."id" IN (42, 43)
382791
+  (0.0ms) rollback transaction
382792
+  (0.0ms) begin transaction
382793
+  (0.0ms) SAVEPOINT active_record_1
382794
+ SQL (0.1ms) INSERT INTO "authors" ("id", "name", "code", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 42], ["name", "Jack"], ["code", "foo"], ["created_at", "2016-04-23 04:54:03.552777"], ["updated_at", "2016-04-23 04:54:03.552777"]]
382795
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382796
+  (0.0ms) SAVEPOINT active_record_1
382797
+ SQL (0.0ms) INSERT INTO "authors" ("id", "name", "code", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 43], ["name", "John"], ["code", "foo"], ["created_at", "2016-04-23 04:54:03.554130"], ["updated_at", "2016-04-23 04:54:03.554130"]]
382798
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382799
+  (0.0ms) SAVEPOINT active_record_1
382800
+ SQL (0.0ms) INSERT INTO "authors" ("id", "name", "code", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 44], ["name", "Jack"], ["code", "bar"], ["created_at", "2016-04-23 04:54:03.555308"], ["updated_at", "2016-04-23 04:54:03.555308"]]
382801
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382802
+  (0.1ms) SELECT COUNT(*) FROM "authors" WHERE "authors"."name" = ? AND "authors"."code" IN ('foo', 'bar') [["name", "Jack"]]
382803
+ ARModels::Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."name" = ? AND "authors"."code" IN ('foo', 'bar') [["name", "Jack"]]
382804
+  (0.0ms) rollback transaction
382805
+  (0.0ms) begin transaction
382806
+  (0.0ms) rollback transaction
382807
+  (0.0ms) begin transaction
382808
+  (0.0ms) SAVEPOINT active_record_1
382809
+ SQL (0.1ms) INSERT INTO "authors" ("id", "created_at", "updated_at") VALUES (?, ?, ?) [["id", 9], ["created_at", "2016-04-23 04:54:03.559614"], ["updated_at", "2016-04-23 04:54:03.559614"]]
382810
+  (0.1ms) RELEASE SAVEPOINT active_record_1
382811
+  (0.1ms) SAVEPOINT active_record_1
382812
+ SQL (0.1ms) INSERT INTO "comments" ("id") VALUES (?) [["id", 5]]
382813
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382814
+  (0.0ms) SAVEPOINT active_record_1
382815
+ SQL (0.0ms) INSERT INTO "comments" ("id") VALUES (?) [["id", 12]]
382816
+  (0.1ms) RELEASE SAVEPOINT active_record_1
382817
+  (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."id" IN (5, 12)
382818
+ ARModels::Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" IN (5, 12)
382819
+ ARModels::Comment Load (0.1ms) SELECT "comments"."id" FROM "comments" WHERE "comments"."id" IN (5, 12)
382820
+ ARModels::Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE "authors"."id" = ? LIMIT 1 [["id", 9]]
382821
+  (0.0ms) rollback transaction
382822
+  (0.1ms) begin transaction
382823
+  (0.0ms) SAVEPOINT active_record_1
382824
+ SQL (0.1ms) INSERT INTO "posts" ("id", "created_at", "updated_at") VALUES (?, ?, ?) [["id", 1], ["created_at", "2016-04-23 04:54:03.575057"], ["updated_at", "2016-04-23 04:54:03.575057"]]
382825
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382826
+  (0.0ms) SAVEPOINT active_record_1
382827
+ SQL (0.0ms) INSERT INTO "authors" ("id", "name", "code", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 9], ["name", "John"], ["code", "foo"], ["created_at", "2016-04-23 04:54:03.576484"], ["updated_at", "2016-04-23 04:54:03.576484"]]
382828
+  (0.1ms) RELEASE SAVEPOINT active_record_1
382829
+  (0.0ms) SAVEPOINT active_record_1
382830
+ SQL (0.1ms) INSERT INTO "authors" ("id", "name", "code", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["id", 10], ["name", "John"], ["code", "bar"], ["created_at", "2016-04-23 04:54:03.577662"], ["updated_at", "2016-04-23 04:54:03.577662"]]
382831
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382832
+  (0.0ms) SAVEPOINT active_record_1
382833
+ SQL (0.0ms) INSERT INTO "comments" ("id") VALUES (?) [["id", 5]]
382834
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382835
+  (0.0ms) SAVEPOINT active_record_1
382836
+ SQL (0.0ms) INSERT INTO "comments" ("id") VALUES (?) [["id", 12]]
382837
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382838
+  (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."id" IN (5, 12)
382839
+ ARModels::Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" IN (5, 12)
382840
+ ARModels::Comment Load (0.1ms) SELECT "comments"."id" FROM "comments" WHERE "comments"."id" IN (5, 12)
382841
+ ARModels::Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."code" = ? AND "authors"."name" = ? LIMIT 1 [["code", "foo"], ["name", "John"]]
382842
+  (0.0ms) rollback transaction
382843
+  (0.0ms) begin transaction
382844
+  (0.0ms) SAVEPOINT active_record_1
382845
+ SQL (0.1ms) INSERT INTO "posts" ("id", "created_at", "updated_at") VALUES (?, ?, ?) [["id", 1], ["created_at", "2016-04-23 04:54:03.584836"], ["updated_at", "2016-04-23 04:54:03.584836"]]
382846
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382847
+  (0.0ms) SAVEPOINT active_record_1
382848
+ SQL (0.0ms) INSERT INTO "authors" ("id", "created_at", "updated_at") VALUES (?, ?, ?) [["id", 9], ["created_at", "2016-04-23 04:54:03.586149"], ["updated_at", "2016-04-23 04:54:03.586149"]]
382849
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382850
+  (0.0ms) SAVEPOINT active_record_1
382851
+ SQL (0.0ms) INSERT INTO "comments" ("id") VALUES (?) [["id", 5]]
382852
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382853
+  (0.0ms) SAVEPOINT active_record_1
382854
+ SQL (0.0ms) INSERT INTO "comments" ("id") VALUES (?) [["id", 12]]
382855
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382856
+  (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."id" IN (5, 12)
382857
+ ARModels::Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" IN (5, 12)
382858
+ ARModels::Comment Load (0.1ms) SELECT "comments"."id" FROM "comments" WHERE "comments"."id" IN (5, 12)
382859
+ ARModels::Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE "authors"."id" = ? LIMIT 1 [["id", 9]]
382860
+  (0.0ms) rollback transaction
382861
+  (0.0ms) begin transaction
382862
+  (0.0ms) SAVEPOINT active_record_1
382863
+ SQL (0.1ms) INSERT INTO "posts" ("id", "created_at", "updated_at") VALUES (?, ?, ?) [["id", 1], ["created_at", "2016-04-23 04:54:03.593184"], ["updated_at", "2016-04-23 04:54:03.593184"]]
382864
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382865
+  (0.0ms) SAVEPOINT active_record_1
382866
+ SQL (0.0ms) INSERT INTO "authors" ("id", "created_at", "updated_at") VALUES (?, ?, ?) [["id", 9], ["created_at", "2016-04-23 04:54:03.594501"], ["updated_at", "2016-04-23 04:54:03.594501"]]
382867
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382868
+ ARModels::Author Load (0.0ms) SELECT "authors".* FROM "authors" WHERE "authors"."id" = ? LIMIT 1 [["id", 9]]
382869
+  (0.0ms) rollback transaction
382870
+  (0.0ms) begin transaction
382871
+  (0.0ms) SAVEPOINT active_record_1
382872
+ SQL (0.1ms) INSERT INTO "posts" ("id", "created_at", "updated_at") VALUES (?, ?, ?) [["id", 1], ["created_at", "2016-04-23 04:54:03.598219"], ["updated_at", "2016-04-23 04:54:03.598219"]]
382873
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382874
+  (0.1ms) SAVEPOINT active_record_1
382875
+ SQL (0.0ms) INSERT INTO "authors" ("id", "created_at", "updated_at") VALUES (?, ?, ?) [["id", 9], ["created_at", "2016-04-23 04:54:03.599580"], ["updated_at", "2016-04-23 04:54:03.599580"]]
382876
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382877
+  (0.0ms) SAVEPOINT active_record_1
382878
+ SQL (0.1ms) INSERT INTO "comments" ("id", "contents") VALUES (?, ?) [["id", 5], ["contents", "Blargh"]]
382879
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382880
+  (0.0ms) SAVEPOINT active_record_1
382881
+ SQL (0.0ms) INSERT INTO "comments" ("id", "contents") VALUES (?, ?) [["id", 12], ["contents", "Foobar"]]
382882
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382883
+  (0.1ms) SELECT COUNT(*) FROM "comments" WHERE "comments"."id" IN (5, 12)
382884
+ ARModels::Comment Load (0.1ms) SELECT "comments".* FROM "comments" WHERE "comments"."id" IN (5, 12)
382885
+  (0.0ms) rollback transaction
382886
+  (0.1ms) begin transaction
382887
+  (0.1ms) rollback transaction
382888
+  (0.1ms) begin transaction
382889
+  (0.0ms) rollback transaction
382890
+  (0.0ms) begin transaction
382891
+  (0.0ms) rollback transaction
382892
+  (0.1ms) begin transaction
382893
+ Unable to determine type for anonymous Deserializer
382894
+  (0.1ms) rollback transaction
382895
+  (0.2ms) begin transaction
382896
+  (0.1ms) SAVEPOINT active_record_1
382897
+ SQL (0.1ms) INSERT INTO "authors" ("id", "code", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["id", 1], ["code", "foobar"], ["created_at", "2016-04-23 04:54:03.616114"], ["updated_at", "2016-04-23 04:54:03.616114"]]
382898
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382899
+ Unable to determine type for anonymous Deserializer
382900
+ ARModels::Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."code" = ? LIMIT 1 [["code", "foobar"]]
382901
+  (0.1ms) rollback transaction
382902
+  (0.0ms) begin transaction
382903
+ Unable to determine type for anonymous Deserializer
382904
+ ARModels::Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."code" = ? LIMIT 1 [["code", "foobar"]]
382905
+  (0.1ms) rollback transaction
382906
+  (0.1ms) begin transaction
382907
+ Unable to determine type for anonymous Deserializer
382908
+  (0.1ms) rollback transaction
382909
+  (0.1ms) begin transaction
382910
+ Unable to determine type for anonymous Deserializer
382911
+  (0.1ms) rollback transaction
382912
+  (0.1ms) begin transaction
382913
+ Unable to determine type for anonymous Deserializer
382914
+  (0.1ms) rollback transaction
382915
+  (0.0ms) begin transaction
382916
+ Unable to determine type for anonymous Deserializer
382917
+  (0.1ms) rollback transaction
382918
+  (0.1ms) begin transaction
382919
+ Unable to determine type for anonymous Deserializer
382920
+  (0.1ms) rollback transaction
382921
+  (0.1ms) begin transaction
382922
+  (0.0ms) SAVEPOINT active_record_1
382923
+ SQL (0.1ms) INSERT INTO "authors" ("id", "code", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["id", 1], ["code", "foobar"], ["created_at", "2016-04-23 04:54:03.635479"], ["updated_at", "2016-04-23 04:54:03.635479"]]
382924
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382925
+ Unable to determine type for anonymous Deserializer
382926
+  (0.1ms) SELECT COUNT(*) FROM "authors" WHERE "authors"."code" IN ('foobar', 'blargh')
382927
+ ARModels::Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."code" IN ('foobar', 'blargh')
382928
+  (0.0ms) rollback transaction
382929
+  (0.1ms) begin transaction
382930
+ Unable to determine type for anonymous Deserializer
382931
+  (0.1ms) rollback transaction
382932
+  (0.1ms) begin transaction
382933
+ Unable to determine type for anonymous Deserializer
382934
+  (0.1ms) SELECT COUNT(*) FROM "authors" WHERE "authors"."code" IN ('foobar', 'blargh')
382935
+ ARModels::Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."code" IN ('foobar', 'blargh')
382936
+  (0.1ms) rollback transaction
382937
+  (0.1ms) begin transaction
382938
+  (0.0ms) SAVEPOINT active_record_1
382939
+ SQL (0.1ms) INSERT INTO "authors" ("id", "code", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["id", 1], ["code", "foobar"], ["created_at", "2016-04-23 04:54:03.649604"], ["updated_at", "2016-04-23 04:54:03.649604"]]
382940
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382941
+  (0.0ms) SAVEPOINT active_record_1
382942
+ SQL (0.0ms) INSERT INTO "authors" ("id", "code", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["id", 2], ["code", "blargh"], ["created_at", "2016-04-23 04:54:03.651084"], ["updated_at", "2016-04-23 04:54:03.651084"]]
382943
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382944
+ Unable to determine type for anonymous Deserializer
382945
+  (0.1ms) SELECT COUNT(*) FROM "authors" WHERE "authors"."code" IN ('foobar', 'blargh')
382946
+ ARModels::Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."code" IN ('foobar', 'blargh')
382947
+  (0.1ms) rollback transaction
382948
+  (0.1ms) begin transaction
382949
+  (0.0ms) SAVEPOINT active_record_1
382950
+ SQL (0.1ms) INSERT INTO "authors" ("id", "code", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["id", 1], ["code", "foobar"], ["created_at", "2016-04-23 04:54:03.656797"], ["updated_at", "2016-04-23 04:54:03.656797"]]
382951
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382952
+  (0.0ms) SAVEPOINT active_record_1
382953
+ SQL (0.0ms) INSERT INTO "authors" ("id", "code", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["id", 2], ["code", "blargh"], ["created_at", "2016-04-23 04:54:03.658051"], ["updated_at", "2016-04-23 04:54:03.658051"]]
382954
+  (0.0ms) RELEASE SAVEPOINT active_record_1
382955
+ Unable to determine type for anonymous Deserializer
382956
+  (0.1ms) SELECT COUNT(*) FROM "authors" WHERE "authors"."code" IN ('foobar', 'blargh')
382957
+ ARModels::Author Load (0.1ms) SELECT "authors".* FROM "authors" WHERE "authors"."code" IN ('foobar', 'blargh')
382958
+ ARModels::Author Load (0.1ms) SELECT "authors"."id" FROM "authors" WHERE "authors"."code" IN ('foobar', 'blargh')
382959
+  (0.1ms) rollback transaction
382960
+  (0.0ms) begin transaction
382961
+  (0.0ms) rollback transaction
382962
+  (0.0ms) begin transaction
382963
+  (0.0ms) rollback transaction
382964
+  (0.1ms) begin transaction
382965
+ Unable to determine type for anonymous Deserializer
382966
+  (0.1ms) rollback transaction
382967
+  (0.1ms) begin transaction
382968
+ Unable to determine type for anonymous Deserializer
382969
+  (0.1ms) rollback transaction
382970
+  (0.1ms) begin transaction
382971
+ Unable to determine type for anonymous Deserializer
382972
+  (0.1ms) rollback transaction
382973
+  (0.1ms) begin transaction
382974
+ Unable to determine type for anonymous Deserializer
382975
+  (0.1ms) rollback transaction
382976
+  (0.1ms) begin transaction
382977
+ Unable to determine type for anonymous Deserializer
382978
+  (0.1ms) rollback transaction
382979
+  (0.2ms) begin transaction
382980
+ Unable to determine type for anonymous Deserializer
382981
+  (0.1ms) rollback transaction
382982
+  (0.1ms) begin transaction
382983
+ Unable to determine type for anonymous Deserializer
382984
+  (0.1ms) rollback transaction
382985
+  (0.1ms) begin transaction
382986
+ Unable to determine type for anonymous Deserializer
382987
+  (0.1ms) rollback transaction
382988
+  (0.1ms) begin transaction
382989
+ Unable to determine type for anonymous Deserializer
382990
+  (0.1ms) rollback transaction
382991
+  (0.1ms) begin transaction
382992
+ Unable to determine type for anonymous Deserializer
382993
+  (0.1ms) rollback transaction
382994
+  (0.1ms) begin transaction
382995
+ Unable to determine type for anonymous Deserializer
382996
+  (0.1ms) rollback transaction
382997
+  (0.1ms) begin transaction
382998
+ Unable to determine type for anonymous Deserializer
382999
+  (0.1ms) rollback transaction
383000
+  (0.0ms) begin transaction
383001
+ Unable to determine type for anonymous Deserializer
383002
+  (0.1ms) rollback transaction
383003
+  (0.0ms) begin transaction
383004
+ Unable to determine type for anonymous Deserializer
383005
+  (0.1ms) rollback transaction
383006
+  (0.0ms) begin transaction
383007
+ Unable to determine type for anonymous Deserializer
383008
+  (0.1ms) rollback transaction
383009
+  (0.0ms) begin transaction
383010
+ Unable to determine type for anonymous Deserializer
383011
+  (0.1ms) rollback transaction
383012
+  (0.1ms) begin transaction
383013
+ Unable to determine type for anonymous Deserializer
383014
+  (0.1ms) rollback transaction
383015
+  (0.1ms) begin transaction
383016
+ Unable to determine type for anonymous Deserializer
383017
+  (0.1ms) rollback transaction
383018
+  (0.1ms) begin transaction
383019
+ Unable to determine type for anonymous Deserializer
383020
+  (0.1ms) rollback transaction
383021
+  (0.1ms) begin transaction
383022
+ Unable to determine type for anonymous Deserializer
383023
+  (0.1ms) rollback transaction
383024
+  (0.0ms) begin transaction
383025
+ Unable to determine type for anonymous Deserializer
383026
+  (0.1ms) rollback transaction
383027
+  (0.0ms) begin transaction
383028
+ Unable to determine type for anonymous Deserializer
383029
+  (0.1ms) rollback transaction
383030
+  (0.1ms) begin transaction
383031
+ Unable to determine type for anonymous Deserializer
383032
+  (0.1ms) rollback transaction
383033
+  (0.1ms) begin transaction
383034
+ Unable to determine type for anonymous Deserializer
383035
+  (0.1ms) rollback transaction
383036
+  (0.0ms) begin transaction
383037
+ Unable to determine type for anonymous Deserializer
383038
+  (0.1ms) rollback transaction
383039
+  (0.1ms) begin transaction
383040
+ Unable to determine type for anonymous Deserializer
383041
+  (0.1ms) rollback transaction
383042
+  (0.1ms) begin transaction
383043
+ Unable to determine type for anonymous Deserializer
383044
+  (0.1ms) rollback transaction
383045
+  (0.1ms) begin transaction
383046
+ Unable to determine type for anonymous Deserializer
383047
+  (0.1ms) rollback transaction
383048
+  (0.1ms) begin transaction
383049
+ Unable to determine type for anonymous Deserializer
383050
+  (0.1ms) rollback transaction
383051
+  (0.1ms) begin transaction
383052
+ Unable to determine type for anonymous Deserializer
383053
+  (0.1ms) rollback transaction
383054
+  (0.1ms) begin transaction
383055
+ Unable to determine type for anonymous Deserializer
383056
+  (0.1ms) rollback transaction
383057
+  (0.1ms) begin transaction
383058
+ Unable to determine type for anonymous Deserializer
383059
+ Unable to determine type for anonymous Deserializer
383060
+  (0.1ms) rollback transaction
383061
+  (0.1ms) begin transaction
383062
+  (0.0ms) rollback transaction
383063
+  (0.1ms) begin transaction
383064
+ Unable to determine type for anonymous Deserializer
383065
+ Unable to determine type for anonymous Deserializer
383066
+  (0.1ms) rollback transaction
383067
+  (0.1ms) begin transaction
383068
+ Started POST "/echo" for 127.0.0.1 at 2016-04-23 14:54:03 +1000
383069
+ Processing by ApplicationController#echo as JSON_API
383070
+ Parameters: {"data"=>{"id"=>"42", "type"=>"foobar"}}
383071
+ [active_model_serializers] Rendered ActiveModel::Serializer::Null with ActionController::Parameters (0.1ms)
383072
+ Completed 200 OK in 2ms (Views: 2.0ms | ActiveRecord: 0.0ms)
383073
+  (0.1ms) rollback transaction
383074
+  (0.1ms) begin transaction
383075
+ Started POST "/echo" for 127.0.0.1 at 2016-04-23 14:54:03 +1000
383076
+ Error occurred while parsing request parameters.
383077
+ Contents:
383078
+
383079
+ {"data":{"id":"42","type":"foobar",}}
383080
+  (0.1ms) rollback transaction
383081
+  (0.1ms) begin transaction
383082
+ Started POST "/echo" for 127.0.0.1 at 2016-04-23 14:54:03 +1000
383083
+ Error occurred while parsing request parameters.
383084
+ Contents:
383085
+
383086
+ {"data":{"id":"42","type":"foobar",}}
383087
+  (0.1ms) rollback transaction
383088
+  (0.1ms) begin transaction
383089
+ Started POST "/echo" for 127.0.0.1 at 2016-04-23 14:54:03 +1000
383090
+ Error occurred while parsing request parameters.
383091
+ Contents:
383092
+
383093
+ {"data":{"id":"42","type":"foobar",}}
383094
+  (0.1ms) rollback transaction
383095
+  (0.1ms) begin transaction
383096
+ Started POST "/echo" for 127.0.0.1 at 2016-04-23 14:54:03 +1000
383097
+ Error occurred while parsing request parameters.
383098
+ Contents:
383099
+
383100
+ {"data":{"id":"42","type":"foobar",}}
383101
+  (0.3ms) rollback transaction
383102
+  (0.1ms) begin transaction
383103
+ Started POST "/echo" for 127.0.0.1 at 2016-04-23 14:54:03 +1000
383104
+ Error occurred while parsing request parameters.
383105
+ Contents:
383106
+
383107
+ {"data":{"id":"42","type":"foobar",}}
383108
+  (0.1ms) rollback transaction
@@ -38,6 +38,23 @@ describe 'Request Parsing', type: :request do
38
38
  end
39
39
  end
40
40
 
41
+ context 'when the request has a json api accept header with utf-8 charset' do
42
+ it 'renders a json api invalid document response' do
43
+ post '/echo',
44
+ invalid_request_data,
45
+ 'Accept': 'application/vnd.api+json; charset=utf-8',
46
+ 'Content-Type': 'application/vnd.api+json; charset=utf-8'
47
+
48
+ expect(response.status).to eq 400
49
+ expect(JSON.parse(response.body, symbolize_names: true)).to eq(
50
+ errors: [{
51
+ code: 'invalid_request_body',
52
+ title: 'Request json_api body could not be parsed',
53
+ status: '400'
54
+ }])
55
+ end
56
+ end
57
+
41
58
  context 'when the request does not have a json api accept header' do
42
59
  it 'renders a json api invalid document response' do
43
60
  invalid_request_data = '{"data":{"id":"42","type":"foobar",}}' # extra comma
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fun_with_json_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Morrall