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: 38d5782d5fc96b6f64457ca39615c5f14ebaffb6
4
- data.tar.gz: 32e5ba5e92e3cdc20c4a189b3b18736c76b6ff80
3
+ metadata.gz: dffdac8d3b55458fb7a23905f95cff7e62c30534
4
+ data.tar.gz: 1848dd3ce8e5445d1bbfe6af7add735f3050a43f
5
5
  SHA512:
6
- metadata.gz: 1232f85342de51775e3eae3e3253f0993ee5d76477aabb9a47c1623caf6a5335912060481248e6856136f65af48864953483e172fd44563e5667a7bd473f7631
7
- data.tar.gz: ef712f8fb8f3cdced98e658639b83f04145758f83490f0261361d1214aa59accde3664abd441de9624315255666097915a2a113ecb23d71ccd9f3b532c93ab74
6
+ metadata.gz: 2ab966b59a6dc148076c69c9597e3e89319e784b424e2a2a148b2acabe2966203a2bf2dffaef782d8d023b9e542f0cc767dd4f8e7ef0841a47e35977f85e6e99
7
+ data.tar.gz: eb48d59bddbd307752b1ccad948391d017207c04b1f89a2f14fbf15df622318144538e841fd6135d2cbf572377a74946b6e7ec74730d5a42daec4ff84a0d7c0e
@@ -1,3 +1,3 @@
1
1
  module BeforeActions
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
@@ -1,6 +1,6 @@
1
1
  module BeforeActions
2
2
  module Generators
3
- class InstallGenerator < Rails::Generators::Base
3
+ class TemplateGenerator < Rails::Generators::Base
4
4
  source_root File.expand_path('../templates', __FILE__)
5
5
 
6
6
  def generate_template
@@ -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
- actions { } # load your nested resource's parent here if you need one
11
- actions(:index) { @<%= plural_table_name %> = <%= orm_class.all(class_name) %> }
12
- actions(:new) { @<%= singular_table_name %> = <%= orm_class.build(class_name) %> }
13
- actions(:create) { @<%= singular_table_name %> = <%= orm_class.build(class_name, "#{singular_table_name}_params") %> }
14
- actions(:show, :edit, :update, :destroy) { @<%= singular_table_name %> = <%= orm_class.find(class_name, "params[:id]") %> }
15
- actions { } # run your authorization logic here if you need one
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
@@ -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
   (0.1ms) rollback transaction
4291
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
4292
+  (0.1ms) begin transaction
4293
+  (0.1ms) SAVEPOINT active_record_1
4294
+ SQL (1.1ms) 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
+  (0.2ms) RELEASE SAVEPOINT active_record_1
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
+ AdminFoo Load (0.2ms) SELECT "admin_foos".* FROM "admin_foos"
4300
+  (0.5ms) rollback transaction
4301
+  (0.1ms) begin transaction
4302
+  (0.1ms) SAVEPOINT active_record_1
4303
+ SQL (0.3ms) 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
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4305
+ Processing by AdminFoosController#show as HTML
4306
+ Parameters: {"id"=>"1"}
4307
+ AdminFoo Load (0.2ms) 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
+  (0.5ms) rollback transaction
4310
+  (0.1ms) 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
+  (0.1ms) rollback transaction
4315
+  (0.1ms) begin transaction
4316
+  (0.0ms) SAVEPOINT active_record_1
4317
+ SQL (0.3ms) 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
+  (0.1ms) RELEASE SAVEPOINT active_record_1
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
+  (0.5ms) rollback transaction
4324
+  (0.1ms) begin transaction
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
+  (0.1ms) rollback transaction
4330
+  (0.1ms) begin transaction
4331
+  (0.1ms) SAVEPOINT active_record_1
4332
+ SQL (0.4ms) INSERT INTO "admin_foos" ("bar", "created_at", "updated_at") VALUES (?, ?, ?) [["bar", "cool"], ["created_at", "2014-09-12 20:38:01.661066"], ["updated_at", "2014-09-12 20:38:01.661066"]]
4333
+  (0.1ms) 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
+  (0.5ms) rollback transaction
4339
+  (0.1ms) begin transaction
4340
+  (0.0ms) SAVEPOINT active_record_1
4341
+ SQL (0.3ms) 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
+  (0.1ms) RELEASE SAVEPOINT active_record_1
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
+  (0.5ms) rollback transaction
4348
+  (0.1ms) begin transaction
4349
+ Processing by BunnyController#one as HTML
4350
+ Completed 200 OK in 3ms (Views: 2.9ms | ActiveRecord: 0.0ms)
4351
+  (0.1ms) rollback transaction
4352
+  (0.1ms) begin transaction
4353
+ Processing by BunnyController#two as HTML
4354
+ Completed 200 OK in 2ms (Views: 2.0ms | ActiveRecord: 0.0ms)
4355
+  (0.1ms) rollback transaction
4356
+  (0.1ms) begin transaction
4357
+ Processing by BunnyController#three as HTML
4358
+ Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.0ms)
4359
+  (0.1ms) rollback transaction
4360
+  (0.1ms) begin transaction
4361
+ Processing by CatController#one as HTML
4362
+ Completed 200 OK in 3ms (Views: 3.0ms | ActiveRecord: 0.0ms)
4363
+  (0.1ms) rollback transaction
4364
+  (0.1ms) begin transaction
4365
+ Processing by CatController#two as HTML
4366
+ Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms)
4367
+  (0.1ms) rollback transaction
4368
+  (0.1ms) begin transaction
4369
+ Processing by CatController#three as HTML
4370
+ Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.0ms)
4371
+  (0.1ms) rollback transaction
4372
+  (0.1ms) begin transaction
4373
+ Processing by DogController#one as HTML
4374
+ Completed 200 OK in 4ms (Views: 3.0ms | ActiveRecord: 0.0ms)
4375
+  (0.1ms) rollback transaction
4376
+  (0.1ms) begin transaction
4377
+ Processing by DogController#two as HTML
4378
+ Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)
4379
+  (0.1ms) rollback transaction
4380
+  (0.0ms) begin transaction
4381
+ Processing by DogController#three as HTML
4382
+ Completed 200 OK in 2ms (Views: 2.2ms | ActiveRecord: 0.0ms)
4383
+  (0.1ms) rollback transaction
4384
+  (0.1ms) begin transaction
4385
+  (0.1ms) SAVEPOINT active_record_1
4386
+ SQL (0.7ms) INSERT INTO "foos" ("bar", "created_at", "updated_at") VALUES (?, ?, ?) [["bar", "cool"], ["created_at", "2014-09-12 20:38:01.732501"], ["updated_at", "2014-09-12 20:38:01.732501"]]
4387
+  (0.1ms) 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
+ Foo Load (0.3ms) SELECT "foos".* FROM "foos"
4391
+  (0.7ms) rollback transaction
4392
+  (0.1ms) begin transaction
4393
+  (0.0ms) SAVEPOINT active_record_1
4394
+ SQL (0.2ms) INSERT INTO "foos" ("bar", "created_at", "updated_at") VALUES (?, ?, ?) [["bar", "cool"], ["created_at", "2014-09-12 20:38:01.757355"], ["updated_at", "2014-09-12 20:38:01.757355"]]
4395
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4396
+ Processing by FoosController#show as HTML
4397
+ Parameters: {"id"=>"1"}
4398
+ Foo Load (0.2ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]]
4399
+ Completed 200 OK in 4ms (Views: 2.8ms | ActiveRecord: 0.2ms)
4400
+  (0.4ms) rollback transaction
4401
+  (0.1ms) begin transaction
4402
+ Processing by FoosController#new as HTML
4403
+ Completed 200 OK in 5ms (Views: 4.3ms | ActiveRecord: 0.0ms)
4404
+  (0.1ms) rollback transaction
4405
+  (0.1ms) begin transaction
4406
+  (0.1ms) SAVEPOINT active_record_1
4407
+ SQL (0.4ms) INSERT INTO "foos" ("bar", "created_at", "updated_at") VALUES (?, ?, ?) [["bar", "cool"], ["created_at", "2014-09-12 20:38:01.775326"], ["updated_at", "2014-09-12 20:38:01.775326"]]
4408
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4409
+ Processing by FoosController#edit as HTML
4410
+ Parameters: {"id"=>"1"}
4411
+ Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]]
4412
+ Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.1ms)
4413
+  (0.7ms) rollback transaction
4414
+  (0.1ms) begin transaction
4415
+  (0.2ms) SELECT COUNT(*) FROM "foos"
4416
+ Processing by FoosController#create as HTML
4417
+ Parameters: {"foo"=>{"bar"=>"cool"}}
4418
+  (0.1ms) SAVEPOINT active_record_1
4419
+ SQL (0.3ms) 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
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4421
+ Redirected to http://test.host/foos/1
4422
+ Completed 302 Found in 4ms (ActiveRecord: 0.5ms)
4423
+  (0.1ms) SELECT COUNT(*) FROM "foos"
4424
+  (0.4ms) rollback transaction
4425
+  (0.1ms) begin transaction
4426
+ Processing by FoosController#create as HTML
4427
+ Parameters: {"foo"=>{"bar"=>"cool"}}
4428
+  (0.1ms) SAVEPOINT active_record_1
4429
+ SQL (0.3ms) 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
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4431
+ Redirected to http://test.host/foos/1
4432
+ Completed 302 Found in 3ms (ActiveRecord: 0.5ms)
4433
+  (0.5ms) rollback transaction
4434
+  (0.1ms) begin transaction
4435
+ Processing by FoosController#create as HTML
4436
+ Parameters: {"foo"=>{"bar"=>"cool"}}
4437
+  (0.1ms) SAVEPOINT active_record_1
4438
+ SQL (0.3ms) INSERT INTO "foos" ("bar", "created_at", "updated_at") VALUES (?, ?, ?) [["bar", "cool"], ["created_at", "2014-09-12 20:38:01.812352"], ["updated_at", "2014-09-12 20:38:01.812352"]]
4439
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4440
+ Redirected to http://test.host/foos/1
4441
+ Completed 302 Found in 4ms (ActiveRecord: 0.5ms)
4442
+ Foo Load (0.1ms) SELECT "foos".* FROM "foos" ORDER BY "foos"."id" DESC LIMIT 1
4443
+  (0.5ms) rollback transaction
4444
+  (0.1ms) begin transaction
4445
+ Processing by FoosController#create as HTML
4446
+ Parameters: {"foo"=>{"bar"=>""}}
4447
+  (0.1ms) SAVEPOINT active_record_1
4448
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
4449
+ Completed 200 OK in 11ms (Views: 1.4ms | ActiveRecord: 0.1ms)
4450
+  (0.1ms) rollback transaction
4451
+  (0.1ms) begin transaction
4452
+ Processing by FoosController#create as HTML
4453
+ Parameters: {"foo"=>{"bar"=>""}}
4454
+  (0.1ms) SAVEPOINT active_record_1
4455
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
4456
+ Completed 200 OK in 4ms (Views: 1.4ms | ActiveRecord: 0.2ms)
4457
+  (0.1ms) rollback transaction
4458
+  (0.1ms) begin transaction
4459
+  (0.1ms) SAVEPOINT active_record_1
4460
+ SQL (0.7ms) INSERT INTO "foos" ("bar", "created_at", "updated_at") VALUES (?, ?, ?) [["bar", "cool"], ["created_at", "2014-09-12 20:38:01.841797"], ["updated_at", "2014-09-12 20:38:01.841797"]]
4461
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4462
+ Processing by FoosController#update as HTML
4463
+ Parameters: {"foo"=>{"bar"=>"yay"}, "id"=>"1"}
4464
+ Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]]
4465
+  (0.1ms) SAVEPOINT active_record_1
4466
+ SQL (4.6ms) UPDATE "foos" SET "bar" = ?, "updated_at" = ? WHERE "foos"."id" = 1 [["bar", "yay"], ["updated_at", "2014-09-12 20:38:01.848570"]]
4467
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4468
+ Redirected to http://test.host/foos/1
4469
+ Completed 302 Found in 10ms (ActiveRecord: 4.9ms)
4470
+ Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]]
4471
+  (0.5ms) rollback transaction
4472
+  (0.1ms) begin transaction
4473
+  (0.4ms) SAVEPOINT active_record_1
4474
+ SQL (9.4ms) INSERT INTO "foos" ("bar", "created_at", "updated_at") VALUES (?, ?, ?) [["bar", "cool"], ["created_at", "2014-09-12 20:38:01.862804"], ["updated_at", "2014-09-12 20:38:01.862804"]]
4475
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4476
+ Processing by FoosController#update as HTML
4477
+ Parameters: {"foo"=>{"bar"=>"cool"}, "id"=>"1"}
4478
+ Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]]
4479
+  (0.1ms) SAVEPOINT active_record_1
4480
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4481
+ Redirected to http://test.host/foos/1
4482
+ Completed 302 Found in 2ms (ActiveRecord: 0.2ms)
4483
+  (1.2ms) rollback transaction
4484
+  (0.1ms) begin transaction
4485
+  (0.1ms) SAVEPOINT active_record_1
4486
+ SQL (0.4ms) INSERT INTO "foos" ("bar", "created_at", "updated_at") VALUES (?, ?, ?) [["bar", "cool"], ["created_at", "2014-09-12 20:38:01.888589"], ["updated_at", "2014-09-12 20:38:01.888589"]]
4487
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4488
+ Processing by FoosController#update as HTML
4489
+ Parameters: {"foo"=>{"bar"=>"cool"}, "id"=>"1"}
4490
+ Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]]
4491
+  (0.1ms) SAVEPOINT active_record_1
4492
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4493
+ Redirected to http://test.host/foos/1
4494
+ Completed 302 Found in 3ms (ActiveRecord: 0.3ms)
4495
+  (0.5ms) rollback transaction
4496
+  (0.1ms) begin transaction
4497
+  (0.1ms) SAVEPOINT active_record_1
4498
+ SQL (0.4ms) INSERT INTO "foos" ("bar", "created_at", "updated_at") VALUES (?, ?, ?) [["bar", "cool"], ["created_at", "2014-09-12 20:38:01.899684"], ["updated_at", "2014-09-12 20:38:01.899684"]]
4499
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4500
+ Processing by FoosController#update as HTML
4501
+ Parameters: {"foo"=>{"bar"=>""}, "id"=>"1"}
4502
+ Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]]
4503
+  (0.1ms) SAVEPOINT active_record_1
4504
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
4505
+ Completed 200 OK in 4ms (Views: 1.4ms | ActiveRecord: 0.2ms)
4506
+  (0.6ms) rollback transaction
4507
+  (0.1ms) begin transaction
4508
+  (0.1ms) SAVEPOINT active_record_1
4509
+ SQL (0.3ms) INSERT INTO "foos" ("bar", "created_at", "updated_at") VALUES (?, ?, ?) [["bar", "cool"], ["created_at", "2014-09-12 20:38:01.910573"], ["updated_at", "2014-09-12 20:38:01.910573"]]
4510
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4511
+ Processing by FoosController#update as HTML
4512
+ Parameters: {"foo"=>{"bar"=>""}, "id"=>"1"}
4513
+ Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]]
4514
+  (0.1ms) SAVEPOINT active_record_1
4515
+  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1
4516
+ Completed 200 OK in 4ms (Views: 0.9ms | ActiveRecord: 0.2ms)
4517
+  (0.3ms) rollback transaction
4518
+  (0.1ms) begin transaction
4519
+  (0.3ms) SAVEPOINT active_record_1
4520
+ SQL (0.4ms) INSERT INTO "foos" ("bar", "created_at", "updated_at") VALUES (?, ?, ?) [["bar", "cool"], ["created_at", "2014-09-12 20:38:01.922153"], ["updated_at", "2014-09-12 20:38:01.922153"]]
4521
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4522
+  (0.1ms) SELECT COUNT(*) FROM "foos"
4523
+ Processing by FoosController#destroy as HTML
4524
+ Parameters: {"id"=>"1"}
4525
+ Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]]
4526
+  (0.1ms) SAVEPOINT active_record_1
4527
+ SQL (0.8ms) DELETE FROM "foos" WHERE "foos"."id" = ? [["id", 1]]
4528
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4529
+ Redirected to http://test.host/foos
4530
+ Completed 302 Found in 5ms (ActiveRecord: 1.0ms)
4531
+  (0.1ms) SELECT COUNT(*) FROM "foos"
4532
+  (0.5ms) rollback transaction
4533
+  (0.1ms) begin transaction
4534
+  (0.1ms) SAVEPOINT active_record_1
4535
+ SQL (0.3ms) 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
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4537
+ Processing by FoosController#destroy as HTML
4538
+ Parameters: {"id"=>"1"}
4539
+ Foo Load (0.1ms) SELECT "foos".* FROM "foos" WHERE "foos"."id" = ? LIMIT 1 [["id", 1]]
4540
+  (0.1ms) SAVEPOINT active_record_1
4541
+ SQL (0.5ms) DELETE FROM "foos" WHERE "foos"."id" = ? [["id", 1]]
4542
+  (0.1ms) RELEASE SAVEPOINT active_record_1
4543
+ Redirected to http://test.host/foos
4544
+ Completed 302 Found in 2ms (ActiveRecord: 0.7ms)
4545
+  (0.7ms) rollback transaction
4546
+  (0.1ms) begin transaction
4547
+ Processing by SquirrelController#one as HTML
4548
+ Completed 200 OK in 3ms (Views: 2.8ms | ActiveRecord: 0.0ms)
4549
+  (0.1ms) rollback transaction
4550
+  (0.1ms) begin transaction
4551
+ Processing by SquirrelController#two as HTML
4552
+ Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms)
4553
+  (0.1ms) rollback transaction
4554
+  (0.1ms) begin transaction
4555
+ Processing by SquirrelController#three as HTML
4556
+ Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.0ms)
4557
+  (0.1ms) 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.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/install_generator.rb
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