before_actions 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dffdac8d3b55458fb7a23905f95cff7e62c30534
|
4
|
+
data.tar.gz: 1848dd3ce8e5445d1bbfe6af7add735f3050a43f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ab966b59a6dc148076c69c9597e3e89319e784b424e2a2a148b2acabe2966203a2bf2dffaef782d8d023b9e542f0cc767dd4f8e7ef0841a47e35977f85e6e99
|
7
|
+
data.tar.gz: eb48d59bddbd307752b1ccad948391d017207c04b1f89a2f14fbf15df622318144538e841fd6135d2cbf572377a74946b6e7ec74730d5a42daec4ff84a0d7c0e
|
@@ -7,12 +7,13 @@ class <%= controller_class_name %>Controller < ApplicationController
|
|
7
7
|
|
8
8
|
# Use callbacks to share common setup or constraints between actions.
|
9
9
|
before_actions do
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
10
|
+
# all { } # pre-fetching authorization step
|
11
|
+
# all { } # load your nested resource's parent here
|
12
|
+
only(:index) { @<%= plural_table_name %> = <%= orm_class.all(class_name) %> }
|
13
|
+
only(:new) { @<%= singular_table_name %> = <%= orm_class.build(class_name) %> }
|
14
|
+
only(:create) { @<%= singular_table_name %> = <%= orm_class.build(class_name, "#{singular_table_name}_params") %> }
|
15
|
+
only(:show, :edit, :update, :destroy) { @<%= singular_table_name %> = <%= orm_class.find(class_name, "params[:id]") %> }
|
16
|
+
# all { } # post-fetching authorization step
|
16
17
|
end
|
17
18
|
|
18
19
|
# GET <%= route_url %>
|
@@ -26,25 +27,11 @@ class <%= controller_class_name %>Controller < ApplicationController
|
|
26
27
|
|
27
28
|
|
28
29
|
|
30
|
+
|
29
31
|
# GET <%= route_url %>/new
|
30
32
|
def new
|
31
33
|
end
|
32
34
|
|
33
|
-
# GET <%= route_url %>/1
|
34
|
-
# GET <%= route_url %>/1.json
|
35
|
-
def show
|
36
|
-
respond_to do |format|
|
37
|
-
format.html # show.html.erb
|
38
|
-
format.json { render json: <%= "@#{singular_table_name}" %> }
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
# GET <%= route_url %>/1/edit
|
43
|
-
def edit
|
44
|
-
end
|
45
|
-
|
46
|
-
|
47
|
-
|
48
35
|
# POST <%= route_url %>
|
49
36
|
# POST <%= route_url %>.json
|
50
37
|
def create
|
@@ -59,6 +46,23 @@ class <%= controller_class_name %>Controller < ApplicationController
|
|
59
46
|
end
|
60
47
|
end
|
61
48
|
|
49
|
+
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
# GET <%= route_url %>/1
|
54
|
+
# GET <%= route_url %>/1.json
|
55
|
+
def show
|
56
|
+
respond_to do |format|
|
57
|
+
format.html # show.html.erb
|
58
|
+
format.json { render json: <%= "@#{singular_table_name}" %> }
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
# GET <%= route_url %>/1/edit
|
63
|
+
def edit
|
64
|
+
end
|
65
|
+
|
62
66
|
# PATCH/PUT <%= route_url %>/1
|
63
67
|
# PATCH/PUT <%= route_url %>/1.json
|
64
68
|
def update
|
data/spec/dummy/log/test.log
CHANGED
@@ -4288,3 +4288,270 @@ Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.0ms)
|
|
4288
4288
|
Processing by SquirrelController#three as HTML
|
4289
4289
|
Completed 200 OK in 2ms (Views: 1.9ms | ActiveRecord: 0.0ms)
|
4290
4290
|
[1m[35m (0.1ms)[0m rollback transaction
|
4291
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
4292
|
+
[1m[35m (0.1ms)[0m begin transaction
|
4293
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
4294
|
+
[1m[35mSQL (1.1ms)[0m INSERT INTO "admin_foos" ("bar", "created_at", "updated_at") VALUES (?, ?, ?) [["bar", "cool"], ["created_at", "2014-09-12 20:38:01.598594"], ["updated_at", "2014-09-12 20:38:01.598594"]]
|
4295
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
4296
|
+
Processing by AdminFoosController#index as HTML
|
4297
|
+
Rendered admin_foos/index.html.erb within layouts/application (0.7ms)
|
4298
|
+
Completed 200 OK in 17ms (Views: 15.7ms | ActiveRecord: 0.0ms)
|
4299
|
+
[1m[35mAdminFoo Load (0.2ms)[0m SELECT "admin_foos".* FROM "admin_foos"
|
4300
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
4301
|
+
[1m[35m (0.1ms)[0m begin transaction
|
4302
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
4303
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "admin_foos" ("bar", "created_at", "updated_at") VALUES (?, ?, ?) [["bar", "cool"], ["created_at", "2014-09-12 20:38:01.633538"], ["updated_at", "2014-09-12 20:38:01.633538"]]
|
4304
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
4305
|
+
Processing by AdminFoosController#show as HTML
|
4306
|
+
Parameters: {"id"=>"1"}
|
4307
|
+
[1m[35mAdminFoo Load (0.2ms)[0m SELECT "admin_foos".* FROM "admin_foos" WHERE "admin_foos"."id" = ? LIMIT 1 [["id", 1]]
|
4308
|
+
Completed 200 OK in 6ms (Views: 3.0ms | ActiveRecord: 0.2ms)
|
4309
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
4310
|
+
[1m[35m (0.1ms)[0m begin transaction
|
4311
|
+
Processing by AdminFoosController#new as HTML
|
4312
|
+
Filter chain halted as #<Proc:0x007f941c99acc0@/Users/tj/github/before-actions-gem/before_actions/spec/dummy/app/controllers/admin_foos_controller.rb:5> rendered or redirected
|
4313
|
+
Completed 401 Unauthorized in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms)
|
4314
|
+
[1m[36m (0.1ms)[0m [1mrollback transaction[0m
|
4315
|
+
[1m[35m (0.1ms)[0m begin transaction
|
4316
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
4317
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "admin_foos" ("bar", "created_at", "updated_at") VALUES (?, ?, ?) [["bar", "cool"], ["created_at", "2014-09-12 20:38:01.650873"], ["updated_at", "2014-09-12 20:38:01.650873"]]
|
4318
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
4319
|
+
Processing by AdminFoosController#edit as HTML
|
4320
|
+
Parameters: {"id"=>"1"}
|
4321
|
+
Filter chain halted as #<Proc:0x007f941c99acc0@/Users/tj/github/before-actions-gem/before_actions/spec/dummy/app/controllers/admin_foos_controller.rb:5> rendered or redirected
|
4322
|
+
Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
4323
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
4324
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
4325
|
+
Processing by AdminFoosController#create as HTML
|
4326
|
+
Parameters: {"admin_foo"=>{"bar"=>"cool"}}
|
4327
|
+
Filter chain halted as #<Proc:0x007f941c99acc0@/Users/tj/github/before-actions-gem/before_actions/spec/dummy/app/controllers/admin_foos_controller.rb:5> rendered or redirected
|
4328
|
+
Completed 401 Unauthorized in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
|
4329
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
4330
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
4331
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
4332
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "admin_foos" ("bar", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["bar", "cool"], ["created_at", "2014-09-12 20:38:01.661066"], ["updated_at", "2014-09-12 20:38:01.661066"]]
|
4333
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
4334
|
+
Processing by AdminFoosController#update as HTML
|
4335
|
+
Parameters: {"admin_foo"=>{"bar"=>"cool"}, "id"=>"1"}
|
4336
|
+
Filter chain halted as #<Proc:0x007f941c99acc0@/Users/tj/github/before-actions-gem/before_actions/spec/dummy/app/controllers/admin_foos_controller.rb:5> rendered or redirected
|
4337
|
+
Completed 401 Unauthorized in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)
|
4338
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
4339
|
+
[1m[35m (0.1ms)[0m begin transaction
|
4340
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
4341
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "admin_foos" ("bar", "created_at", "updated_at") VALUES (?, ?, ?) [["bar", "cool"], ["created_at", "2014-09-12 20:38:01.669215"], ["updated_at", "2014-09-12 20:38:01.669215"]]
|
4342
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
4343
|
+
Processing by AdminFoosController#destroy as HTML
|
4344
|
+
Parameters: {"id"=>"1"}
|
4345
|
+
Filter chain halted as #<Proc:0x007f941c99acc0@/Users/tj/github/before-actions-gem/before_actions/spec/dummy/app/controllers/admin_foos_controller.rb:5> rendered or redirected
|
4346
|
+
Completed 401 Unauthorized in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
|
4347
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
4348
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
4349
|
+
Processing by BunnyController#one as HTML
|
4350
|
+
Completed 200 OK in 3ms (Views: 2.9ms | ActiveRecord: 0.0ms)
|
4351
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
4352
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
4353
|
+
Processing by BunnyController#two as HTML
|
4354
|
+
Completed 200 OK in 2ms (Views: 2.0ms | ActiveRecord: 0.0ms)
|
4355
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
4356
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
4357
|
+
Processing by BunnyController#three as HTML
|
4358
|
+
Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.0ms)
|
4359
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
4360
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
4361
|
+
Processing by CatController#one as HTML
|
4362
|
+
Completed 200 OK in 3ms (Views: 3.0ms | ActiveRecord: 0.0ms)
|
4363
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
4364
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
4365
|
+
Processing by CatController#two as HTML
|
4366
|
+
Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms)
|
4367
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
4368
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
4369
|
+
Processing by CatController#three as HTML
|
4370
|
+
Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.0ms)
|
4371
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
4372
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
4373
|
+
Processing by DogController#one as HTML
|
4374
|
+
Completed 200 OK in 4ms (Views: 3.0ms | ActiveRecord: 0.0ms)
|
4375
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
4376
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
4377
|
+
Processing by DogController#two as HTML
|
4378
|
+
Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)
|
4379
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
4380
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
4381
|
+
Processing by DogController#three as HTML
|
4382
|
+
Completed 200 OK in 2ms (Views: 2.2ms | ActiveRecord: 0.0ms)
|
4383
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
4384
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
4385
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
4386
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "foos" ("bar", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["bar", "cool"], ["created_at", "2014-09-12 20:38:01.732501"], ["updated_at", "2014-09-12 20:38:01.732501"]]
|
4387
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
4388
|
+
Processing by FoosController#index as HTML
|
4389
|
+
Completed 200 OK in 15ms (Views: 13.9ms | ActiveRecord: 0.0ms)
|
4390
|
+
[1m[36mFoo Load (0.3ms)[0m [1mSELECT "foos".* FROM "foos"[0m
|
4391
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
4392
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
4393
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
4394
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "foos" ("bar", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["bar", "cool"], ["created_at", "2014-09-12 20:38:01.757355"], ["updated_at", "2014-09-12 20:38:01.757355"]]
|
4395
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
4396
|
+
Processing by FoosController#show as HTML
|
4397
|
+
Parameters: {"id"=>"1"}
|
4398
|
+
[1m[36mFoo Load (0.2ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1[0m [["id", 1]]
|
4399
|
+
Completed 200 OK in 4ms (Views: 2.8ms | ActiveRecord: 0.2ms)
|
4400
|
+
[1m[35m (0.4ms)[0m rollback transaction
|
4401
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
4402
|
+
Processing by FoosController#new as HTML
|
4403
|
+
Completed 200 OK in 5ms (Views: 4.3ms | ActiveRecord: 0.0ms)
|
4404
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
4405
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
4406
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
4407
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("bar", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["bar", "cool"], ["created_at", "2014-09-12 20:38:01.775326"], ["updated_at", "2014-09-12 20:38:01.775326"]]
|
4408
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
4409
|
+
Processing by FoosController#edit as HTML
|
4410
|
+
Parameters: {"id"=>"1"}
|
4411
|
+
[1m[36mFoo Load (0.1ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1[0m [["id", 1]]
|
4412
|
+
Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.1ms)
|
4413
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
4414
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
4415
|
+
[1m[35m (0.2ms)[0m SELECT COUNT(*) FROM "foos"
|
4416
|
+
Processing by FoosController#create as HTML
|
4417
|
+
Parameters: {"foo"=>{"bar"=>"cool"}}
|
4418
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
4419
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "foos" ("bar", "created_at", "updated_at") VALUES (?, ?, ?) [["bar", "cool"], ["created_at", "2014-09-12 20:38:01.791790"], ["updated_at", "2014-09-12 20:38:01.791790"]]
|
4420
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
4421
|
+
Redirected to http://test.host/foos/1
|
4422
|
+
Completed 302 Found in 4ms (ActiveRecord: 0.5ms)
|
4423
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "foos"
|
4424
|
+
[1m[36m (0.4ms)[0m [1mrollback transaction[0m
|
4425
|
+
[1m[35m (0.1ms)[0m begin transaction
|
4426
|
+
Processing by FoosController#create as HTML
|
4427
|
+
Parameters: {"foo"=>{"bar"=>"cool"}}
|
4428
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
4429
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "foos" ("bar", "created_at", "updated_at") VALUES (?, ?, ?) [["bar", "cool"], ["created_at", "2014-09-12 20:38:01.799613"], ["updated_at", "2014-09-12 20:38:01.799613"]]
|
4430
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
4431
|
+
Redirected to http://test.host/foos/1
|
4432
|
+
Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
|
4433
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
4434
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
4435
|
+
Processing by FoosController#create as HTML
|
4436
|
+
Parameters: {"foo"=>{"bar"=>"cool"}}
|
4437
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
4438
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "foos" ("bar", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["bar", "cool"], ["created_at", "2014-09-12 20:38:01.812352"], ["updated_at", "2014-09-12 20:38:01.812352"]]
|
4439
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
4440
|
+
Redirected to http://test.host/foos/1
|
4441
|
+
Completed 302 Found in 4ms (ActiveRecord: 0.5ms)
|
4442
|
+
[1m[36mFoo Load (0.1ms)[0m [1mSELECT "foos".* FROM "foos" ORDER BY "foos"."id" DESC LIMIT 1[0m
|
4443
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
4444
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
4445
|
+
Processing by FoosController#create as HTML
|
4446
|
+
Parameters: {"foo"=>{"bar"=>""}}
|
4447
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
4448
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
4449
|
+
Completed 200 OK in 11ms (Views: 1.4ms | ActiveRecord: 0.1ms)
|
4450
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
4451
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
4452
|
+
Processing by FoosController#create as HTML
|
4453
|
+
Parameters: {"foo"=>{"bar"=>""}}
|
4454
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
4455
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
4456
|
+
Completed 200 OK in 4ms (Views: 1.4ms | ActiveRecord: 0.2ms)
|
4457
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
4458
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
4459
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
4460
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "foos" ("bar", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["bar", "cool"], ["created_at", "2014-09-12 20:38:01.841797"], ["updated_at", "2014-09-12 20:38:01.841797"]]
|
4461
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
4462
|
+
Processing by FoosController#update as HTML
|
4463
|
+
Parameters: {"foo"=>{"bar"=>"yay"}, "id"=>"1"}
|
4464
|
+
[1m[36mFoo Load (0.1ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1[0m [["id", 1]]
|
4465
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
4466
|
+
[1m[36mSQL (4.6ms)[0m [1mUPDATE "foos" SET "bar" = ?, "updated_at" = ? WHERE "foos"."id" = 1[0m [["bar", "yay"], ["updated_at", "2014-09-12 20:38:01.848570"]]
|
4467
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
4468
|
+
Redirected to http://test.host/foos/1
|
4469
|
+
Completed 302 Found in 10ms (ActiveRecord: 4.9ms)
|
4470
|
+
[1m[36mFoo Load (0.1ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1[0m [["id", 1]]
|
4471
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
4472
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
4473
|
+
[1m[35m (0.4ms)[0m SAVEPOINT active_record_1
|
4474
|
+
[1m[36mSQL (9.4ms)[0m [1mINSERT INTO "foos" ("bar", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["bar", "cool"], ["created_at", "2014-09-12 20:38:01.862804"], ["updated_at", "2014-09-12 20:38:01.862804"]]
|
4475
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
4476
|
+
Processing by FoosController#update as HTML
|
4477
|
+
Parameters: {"foo"=>{"bar"=>"cool"}, "id"=>"1"}
|
4478
|
+
[1m[36mFoo Load (0.1ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1[0m [["id", 1]]
|
4479
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
4480
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
4481
|
+
Redirected to http://test.host/foos/1
|
4482
|
+
Completed 302 Found in 2ms (ActiveRecord: 0.2ms)
|
4483
|
+
[1m[35m (1.2ms)[0m rollback transaction
|
4484
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
4485
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
4486
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("bar", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["bar", "cool"], ["created_at", "2014-09-12 20:38:01.888589"], ["updated_at", "2014-09-12 20:38:01.888589"]]
|
4487
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
4488
|
+
Processing by FoosController#update as HTML
|
4489
|
+
Parameters: {"foo"=>{"bar"=>"cool"}, "id"=>"1"}
|
4490
|
+
[1m[36mFoo Load (0.1ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1[0m [["id", 1]]
|
4491
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
4492
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
4493
|
+
Redirected to http://test.host/foos/1
|
4494
|
+
Completed 302 Found in 3ms (ActiveRecord: 0.3ms)
|
4495
|
+
[1m[35m (0.5ms)[0m rollback transaction
|
4496
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
4497
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
4498
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("bar", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["bar", "cool"], ["created_at", "2014-09-12 20:38:01.899684"], ["updated_at", "2014-09-12 20:38:01.899684"]]
|
4499
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
4500
|
+
Processing by FoosController#update as HTML
|
4501
|
+
Parameters: {"foo"=>{"bar"=>""}, "id"=>"1"}
|
4502
|
+
[1m[36mFoo Load (0.1ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1[0m [["id", 1]]
|
4503
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
4504
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
4505
|
+
Completed 200 OK in 4ms (Views: 1.4ms | ActiveRecord: 0.2ms)
|
4506
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
4507
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
4508
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
4509
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "foos" ("bar", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["bar", "cool"], ["created_at", "2014-09-12 20:38:01.910573"], ["updated_at", "2014-09-12 20:38:01.910573"]]
|
4510
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
4511
|
+
Processing by FoosController#update as HTML
|
4512
|
+
Parameters: {"foo"=>{"bar"=>""}, "id"=>"1"}
|
4513
|
+
[1m[36mFoo Load (0.1ms)[0m [1mSELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1[0m [["id", 1]]
|
4514
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
4515
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK TO SAVEPOINT active_record_1[0m
|
4516
|
+
Completed 200 OK in 4ms (Views: 0.9ms | ActiveRecord: 0.2ms)
|
4517
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
4518
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
4519
|
+
[1m[35m (0.3ms)[0m SAVEPOINT active_record_1
|
4520
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "foos" ("bar", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["bar", "cool"], ["created_at", "2014-09-12 20:38:01.922153"], ["updated_at", "2014-09-12 20:38:01.922153"]]
|
4521
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
4522
|
+
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "foos"[0m
|
4523
|
+
Processing by FoosController#destroy as HTML
|
4524
|
+
Parameters: {"id"=>"1"}
|
4525
|
+
[1m[35mFoo Load (0.1ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]]
|
4526
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
4527
|
+
[1m[35mSQL (0.8ms)[0m DELETE FROM "foos" WHERE "foos"."id" = ? [["id", 1]]
|
4528
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
4529
|
+
Redirected to http://test.host/foos
|
4530
|
+
Completed 302 Found in 5ms (ActiveRecord: 1.0ms)
|
4531
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "foos"
|
4532
|
+
[1m[36m (0.5ms)[0m [1mrollback transaction[0m
|
4533
|
+
[1m[35m (0.1ms)[0m begin transaction
|
4534
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
4535
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "foos" ("bar", "created_at", "updated_at") VALUES (?, ?, ?) [["bar", "cool"], ["created_at", "2014-09-12 20:38:01.937184"], ["updated_at", "2014-09-12 20:38:01.937184"]]
|
4536
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
4537
|
+
Processing by FoosController#destroy as HTML
|
4538
|
+
Parameters: {"id"=>"1"}
|
4539
|
+
[1m[35mFoo Load (0.1ms)[0m SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]]
|
4540
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
4541
|
+
[1m[35mSQL (0.5ms)[0m DELETE FROM "foos" WHERE "foos"."id" = ? [["id", 1]]
|
4542
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
4543
|
+
Redirected to http://test.host/foos
|
4544
|
+
Completed 302 Found in 2ms (ActiveRecord: 0.7ms)
|
4545
|
+
[1m[35m (0.7ms)[0m rollback transaction
|
4546
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
4547
|
+
Processing by SquirrelController#one as HTML
|
4548
|
+
Completed 200 OK in 3ms (Views: 2.8ms | ActiveRecord: 0.0ms)
|
4549
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
4550
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
4551
|
+
Processing by SquirrelController#two as HTML
|
4552
|
+
Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms)
|
4553
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
4554
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
4555
|
+
Processing by SquirrelController#three as HTML
|
4556
|
+
Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.0ms)
|
4557
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: before_actions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Pinto
|
@@ -88,7 +88,7 @@ files:
|
|
88
88
|
- lib/before_actions/monkey_patching.rb
|
89
89
|
- lib/before_actions/version.rb
|
90
90
|
- lib/generators/before_actions/USAGE
|
91
|
-
- lib/generators/before_actions/
|
91
|
+
- lib/generators/before_actions/template_generator.rb
|
92
92
|
- lib/generators/before_actions/templates/controller.rb
|
93
93
|
- lib/tasks/before_actions_tasks.rake
|
94
94
|
- spec/controllers/admin_foos_controller_spec.rb
|