strong_parameters 0.1.3 → 0.1.4

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.
data/README.rdoc CHANGED
@@ -10,16 +10,16 @@ In addition, parameters can be marked as required and flow through a predefined
10
10
  def create
11
11
  Person.create(params[:person])
12
12
  end
13
-
13
+
14
14
  # This will pass with flying colors as long as there's a person key in the parameters, otherwise
15
- # it'll raise a ActionController::MissingParameter exception, which will get caught by
15
+ # it'll raise a ActionController::MissingParameter exception, which will get caught by
16
16
  # ActionController::Base and turned into that 400 Bad Request reply.
17
17
  def update
18
- redirect_to current_account.people.find(params[:id]).tap do |person|
18
+ redirect_to current_account.people.find(params[:id]).tap { |person|
19
19
  person.update_attributes!(person_params)
20
- end
20
+ }
21
21
  end
22
-
22
+
23
23
  private
24
24
  # Using a private method to encapsulate the permissible parameters is just a good pattern
25
25
  # since you'll be able to reuse the same permit list between create and update. Also, you
@@ -35,10 +35,19 @@ You can also use permit on nested parameters, like:
35
35
 
36
36
  Thanks to Nick Kallen for the permit idea!
37
37
 
38
- == Todos
38
+ == Installation
39
+
40
+ In Gemfile:
39
41
 
40
- * Automatically permit parameters coming from a signed form [Yehuda]
42
+ gem 'strong_parameters'
43
+
44
+ and then run `bundle`. To activate the strong parameters, you need to include this module in
45
+ every model you want protected.
46
+
47
+ class Post < ActiveRecord::Base
48
+ include ActiveModel::ForbiddenAttributesProtection
49
+ end
41
50
 
42
51
  == Compatibility
43
52
 
44
- Due to a testing issue, this plugin is only fully compatible with rails/3-2-stable rev 275ee0dc7b and forward as well as rails/master rev b49a7ddce1 and forward.
53
+ Due to a testing issue, this plugin is only fully compatible with rails/3-2-stable rev 275ee0dc7b and forward as well as rails/master rev b49a7ddce1 and forward.
@@ -29,7 +29,7 @@ module ActionController
29
29
  def require(key)
30
30
  self[key].presence || raise(ActionController::ParameterMissing.new(key))
31
31
  end
32
-
32
+
33
33
  alias :required :require
34
34
 
35
35
  def permit(*filters)
@@ -37,7 +37,7 @@ module ActionController
37
37
 
38
38
  filters.each do |filter|
39
39
  case filter
40
- when Symbol then
40
+ when Symbol, String then
41
41
  params[filter] = self[filter] if has_key?(filter)
42
42
  when Hash then
43
43
  self.slice(*filter.keys).each do |key, value|
@@ -93,6 +93,11 @@ module ActionController
93
93
  def each_element(object)
94
94
  if object.is_a?(Array)
95
95
  object.map { |el| yield el }.compact
96
+ # fields_for on an array of records uses numeric hash keys
97
+ elsif object.is_a?(Hash) && object.keys.all? { |k| k =~ /\A-?\d+\z/ }
98
+ hash = object.class.new
99
+ object.each { |k,v| hash[k] = yield v }
100
+ hash
96
101
  else
97
102
  yield object
98
103
  end
@@ -104,7 +109,7 @@ module ActionController
104
109
 
105
110
  included do
106
111
  rescue_from(ActionController::ParameterMissing) do |parameter_missing_exception|
107
- render text: "Required parameter missing: #{parameter_missing_exception.param}", status: :bad_request
112
+ render :text => "Required parameter missing: #{parameter_missing_exception.param}", :status => :bad_request
108
113
  end
109
114
  end
110
115
 
@@ -4,7 +4,7 @@ module ActiveModel
4
4
 
5
5
  module ForbiddenAttributesProtection
6
6
  def sanitize_for_mass_assignment(new_attributes, options = {})
7
- if !new_attributes.respond_to?(:permitted?) || (new_attributes.respond_to?(:permitted?) && new_attributes.permitted?)
7
+ if !new_attributes.respond_to?(:permitted?) || new_attributes.permitted?
8
8
  super
9
9
  else
10
10
  raise ActiveModel::ForbiddenAttributes
@@ -0,0 +1,12 @@
1
+ Description:
2
+ Stubs out a scaffolded controller and its views. Different from rails
3
+ scaffold_controller, it uses strong_parameters to whitelist permissible
4
+ attributes in a private method.
5
+ Pass the model name, either CamelCased or under_scored. The controller
6
+ name is retrieved as a pluralized version of the model name.
7
+
8
+ To create a controller within a module, specify the model name as a
9
+ path like 'parent_module/controller_name'.
10
+
11
+ This generates a controller class in app/controllers and invokes helper,
12
+ template engine and test framework generators.
@@ -0,0 +1,10 @@
1
+ require 'rails/generators/rails/scaffold_controller/scaffold_controller_generator'
2
+
3
+ module Rails
4
+ module Generators
5
+ class StrongParametersControllerGenerator < ScaffoldControllerGenerator
6
+ argument :attributes, :type => :array, :default => [], :banner => "field:type field:type"
7
+ source_root File.expand_path("../templates", __FILE__)
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,94 @@
1
+ <% module_namespacing do -%>
2
+ class <%= controller_class_name %>Controller < ApplicationController
3
+ # GET <%= route_url %>
4
+ # GET <%= route_url %>.json
5
+ def index
6
+ @<%= plural_table_name %> = <%= orm_class.all(class_name) %>
7
+
8
+ respond_to do |format|
9
+ format.html # index.html.erb
10
+ format.json { render json: <%= "@#{plural_table_name}" %> }
11
+ end
12
+ end
13
+
14
+ # GET <%= route_url %>/1
15
+ # GET <%= route_url %>/1.json
16
+ def show
17
+ @<%= singular_table_name %> = <%= orm_class.find(class_name, "params[:id]") %>
18
+
19
+ respond_to do |format|
20
+ format.html # show.html.erb
21
+ format.json { render json: <%= "@#{singular_table_name}" %> }
22
+ end
23
+ end
24
+
25
+ # GET <%= route_url %>/new
26
+ # GET <%= route_url %>/new.json
27
+ def new
28
+ @<%= singular_table_name %> = <%= orm_class.build(class_name) %>
29
+
30
+ respond_to do |format|
31
+ format.html # new.html.erb
32
+ format.json { render json: <%= "@#{singular_table_name}" %> }
33
+ end
34
+ end
35
+
36
+ # GET <%= route_url %>/1/edit
37
+ def edit
38
+ @<%= singular_table_name %> = <%= orm_class.find(class_name, "params[:id]") %>
39
+ end
40
+
41
+ # POST <%= route_url %>
42
+ # POST <%= route_url %>.json
43
+ def create
44
+ @<%= singular_table_name %> = <%= orm_class.build(class_name, "#{singular_table_name}_params") %>
45
+
46
+ respond_to do |format|
47
+ if @<%= orm_instance.save %>
48
+ format.html { redirect_to @<%= singular_table_name %>, notice: <%= "'#{human_name} was successfully created.'" %> }
49
+ format.json { render json: <%= "@#{singular_table_name}" %>, status: :created, location: <%= "@#{singular_table_name}" %> }
50
+ else
51
+ format.html { render action: "new" }
52
+ format.json { render json: <%= "@#{orm_instance.errors}" %>, status: :unprocessable_entity }
53
+ end
54
+ end
55
+ end
56
+
57
+ # PATCH/PUT <%= route_url %>/1
58
+ # PATCH/PUT <%= route_url %>/1.json
59
+ def update
60
+ @<%= singular_table_name %> = <%= orm_class.find(class_name, "params[:id]") %>
61
+
62
+ respond_to do |format|
63
+ if @<%= orm_instance.update_attributes("#{singular_table_name}_params") %>
64
+ format.html { redirect_to @<%= singular_table_name %>, notice: <%= "'#{human_name} was successfully updated.'" %> }
65
+ format.json { head :no_content }
66
+ else
67
+ format.html { render action: "edit" }
68
+ format.json { render json: <%= "@#{orm_instance.errors}" %>, status: :unprocessable_entity }
69
+ end
70
+ end
71
+ end
72
+
73
+ # DELETE <%= route_url %>/1
74
+ # DELETE <%= route_url %>/1.json
75
+ def destroy
76
+ @<%= singular_table_name %> = <%= orm_class.find(class_name, "params[:id]") %>
77
+ @<%= orm_instance.destroy %>
78
+
79
+ respond_to do |format|
80
+ format.html { redirect_to <%= index_helper %>_url }
81
+ format.json { head :no_content }
82
+ end
83
+ end
84
+
85
+ private
86
+
87
+ # Use this method to whitelist the permissible parameters. Example:
88
+ # params.require(:person).permit(:name, :age)
89
+ # Also, you can specialize this method with per-user checking of permissible attributes.
90
+ def <%= "#{singular_table_name}_params" %>
91
+ params.require(<%= ":#{singular_table_name}" %>).permit(<%= attributes.map {|a| ":#{a.name}" }.sort.join(', ') %>)
92
+ end
93
+ end
94
+ <% end -%>
@@ -0,0 +1,11 @@
1
+ require 'rails/railtie'
2
+
3
+ module StrongParameters
4
+ class Railtie < ::Rails::Railtie
5
+ if config.respond_to?(:app_generators)
6
+ config.app_generators.scaffold_controller = :strong_parameters_controller
7
+ else
8
+ config.generators.scaffold_controller = :strong_parameters_controller
9
+ end
10
+ end
11
+ end
@@ -1,3 +1,3 @@
1
1
  module StrongParameters
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
@@ -1,2 +1,3 @@
1
1
  require 'action_controller/parameters'
2
2
  require 'active_model/forbidden_attributes_protection'
3
+ require 'strong_parameters/railtie'
@@ -0,0 +1,31 @@
1
+ require 'rails/generators/test_case'
2
+ require 'generators/rails/strong_parameters_controller_generator'
3
+
4
+ class StrongParametersControllerGeneratorTest < Rails::Generators::TestCase
5
+ tests Rails::Generators::StrongParametersControllerGenerator
6
+ arguments %w(User name:string age:integer --orm=none)
7
+ destination File.expand_path("../tmp", File.dirname(__FILE__))
8
+ setup :prepare_destination
9
+
10
+ def test_controller_content
11
+ run_generator
12
+
13
+ assert_file "app/controllers/users_controller.rb" do |content|
14
+
15
+ assert_instance_method :create, content do |m|
16
+ assert_match(/@user = User\.new\(user_params\)/, m)
17
+ assert_match(/@user\.save/, m)
18
+ assert_match(/@user\.errors/, m)
19
+ end
20
+
21
+ assert_instance_method :update, content do |m|
22
+ assert_match(/@user = User\.find\(params\[:id\]\)/, m)
23
+ assert_match(/@user\.update_attributes\(user_params\)/, m)
24
+ assert_match(/@user\.errors/, m)
25
+ end
26
+
27
+ assert_match(/def user_params/, content)
28
+ assert_match(/params\.require\(:user\)\.permit\(:age, :name\)/, content)
29
+ end
30
+ end
31
+ end
@@ -34,15 +34,30 @@ class NestedParametersTest < ActiveSupport::TestCase
34
34
 
35
35
  test "nested arrays with strings" do
36
36
  params = ActionController::Parameters.new({
37
- book: {
38
- genres: ["Tragedy"]
37
+ :book => {
38
+ :genres => ["Tragedy"]
39
39
  }
40
40
  })
41
41
 
42
- permitted = params.permit book: :genres
42
+ permitted = params.permit :book => :genres
43
43
  assert_equal ["Tragedy"], permitted[:book][:genres]
44
44
  end
45
45
 
46
+ test "permit may specify symbols or strings" do
47
+ params = ActionController::Parameters.new({
48
+ book: {
49
+ title: "Romeo and Juliet",
50
+ author: "William Shakespeare"
51
+ },
52
+ magazine: "Shakespeare Today"
53
+ })
54
+
55
+ permitted = params.permit({ book: ["title", :author] }, "magazine")
56
+ assert_equal "Romeo and Juliet", permitted[:book][:title]
57
+ assert_equal "William Shakespeare", permitted[:book][:author]
58
+ assert_equal "Shakespeare Today", permitted[:magazine]
59
+ end
60
+
46
61
  test "nested array with strings that should be hashes" do
47
62
  params = ActionController::Parameters.new({
48
63
  book: {
@@ -77,4 +92,40 @@ class NestedParametersTest < ActiveSupport::TestCase
77
92
  permitted = params.permit book: { genre: :type }
78
93
  assert_nil permitted[:book][:genre]
79
94
  end
95
+
96
+ test "fields_for_style_nested_params" do
97
+ params = ActionController::Parameters.new({
98
+ book: {
99
+ authors_attributes: {
100
+ :'0' => { name: 'William Shakespeare', age_of_death: '52' },
101
+ :'1' => { name: 'Unattributed Assistant' }
102
+ }
103
+ }
104
+ })
105
+ permitted = params.permit book: { authors_attributes: [ :name ] }
106
+
107
+ assert_not_nil permitted[:book][:authors_attributes]['0']
108
+ assert_not_nil permitted[:book][:authors_attributes]['1']
109
+ assert_nil permitted[:book][:authors_attributes]['0'][:age_of_death]
110
+ assert_equal 'William Shakespeare', permitted[:book][:authors_attributes]['0'][:name]
111
+ assert_equal 'Unattributed Assistant', permitted[:book][:authors_attributes]['1'][:name]
112
+ end
113
+
114
+ test "fields_for_style_nested_params with negative numbers" do
115
+ params = ActionController::Parameters.new({
116
+ book: {
117
+ authors_attributes: {
118
+ :'-1' => {name: 'William Shakespeare', age_of_death: '52'},
119
+ :'-2' => {name: 'Unattributed Assistant'}
120
+ }
121
+ }
122
+ })
123
+ permitted = params.permit book: {authors_attributes: [:name]}
124
+
125
+ assert_not_nil permitted[:book][:authors_attributes]['-1']
126
+ assert_not_nil permitted[:book][:authors_attributes]['-2']
127
+ assert_nil permitted[:book][:authors_attributes]['-1'][:age_of_death]
128
+ assert_equal 'William Shakespeare', permitted[:book][:authors_attributes]['-1'][:name]
129
+ assert_equal 'Unattributed Assistant', permitted[:book][:authors_attributes]['-2'][:name]
130
+ end
80
131
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strong_parameters
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-29 00:00:00.000000000 Z
12
+ date: 2012-09-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
16
- requirement: &70325350860480 !ruby/object:Gem::Requirement
16
+ requirement: &2164465820 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.2.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70325350860480
24
+ version_requirements: *2164465820
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: activemodel
27
- requirement: &70325350858180 !ruby/object:Gem::Requirement
27
+ requirement: &2164465300 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,21 @@ dependencies:
32
32
  version: 3.2.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70325350858180
35
+ version_requirements: *2164465300
36
+ - !ruby/object:Gem::Dependency
37
+ name: railties
38
+ requirement: &2164464820 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: 3.2.0
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *2164464820
36
47
  - !ruby/object:Gem::Dependency
37
48
  name: rake
38
- requirement: &70325350848320 !ruby/object:Gem::Requirement
49
+ requirement: &2164464440 !ruby/object:Gem::Requirement
39
50
  none: false
40
51
  requirements:
41
52
  - - ! '>='
@@ -43,7 +54,7 @@ dependencies:
43
54
  version: '0'
44
55
  type: :development
45
56
  prerelease: false
46
- version_requirements: *70325350848320
57
+ version_requirements: *2164464440
47
58
  description:
48
59
  email:
49
60
  - david@heinemeierhansson.com
@@ -53,6 +64,10 @@ extra_rdoc_files: []
53
64
  files:
54
65
  - lib/action_controller/parameters.rb
55
66
  - lib/active_model/forbidden_attributes_protection.rb
67
+ - lib/generators/rails/strong_parameters_controller_generator.rb
68
+ - lib/generators/rails/templates/controller.rb
69
+ - lib/generators/rails/USAGE
70
+ - lib/strong_parameters/railtie.rb
56
71
  - lib/strong_parameters/version.rb
57
72
  - lib/strong_parameters.rb
58
73
  - MIT-LICENSE
@@ -61,8 +76,7 @@ files:
61
76
  - test/action_controller_required_params_test.rb
62
77
  - test/action_controller_tainted_params_test.rb
63
78
  - test/active_model_mass_assignment_taint_protection_test.rb
64
- - test/dummy/db/test.sqlite3
65
- - test/dummy/log/test.log
79
+ - test/controller_generator_test.rb
66
80
  - test/nested_parameters_test.rb
67
81
  - test/parameters_require_test.rb
68
82
  - test/parameters_taint_test.rb
@@ -87,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
101
  version: '0'
88
102
  requirements: []
89
103
  rubyforge_project:
90
- rubygems_version: 1.8.11
104
+ rubygems_version: 1.8.7
91
105
  signing_key:
92
106
  specification_version: 3
93
107
  summary: Permitted and required parameters for Action Pack
@@ -95,8 +109,7 @@ test_files:
95
109
  - test/action_controller_required_params_test.rb
96
110
  - test/action_controller_tainted_params_test.rb
97
111
  - test/active_model_mass_assignment_taint_protection_test.rb
98
- - test/dummy/db/test.sqlite3
99
- - test/dummy/log/test.log
112
+ - test/controller_generator_test.rb
100
113
  - test/nested_parameters_test.rb
101
114
  - test/parameters_require_test.rb
102
115
  - test/parameters_taint_test.rb
File without changes
@@ -1,219 +0,0 @@
1
-  (0.3ms) begin transaction
2
- Processing by PeopleController#create as HTML
3
- Parameters: {"person"=>{"name"=>"Mjallo!"}}
4
- Rendered text template (0.0ms)
5
- Completed 200 OK in 7ms (Views: 6.4ms | ActiveRecord: 0.0ms)
6
-  (0.1ms) rollback transaction
7
-  (0.3ms) begin transaction
8
- Processing by PeopleController#create as HTML
9
- Parameters: {"person"=>{"name"=>"Mjallo!"}}
10
- Rendered text template (0.0ms)
11
- Completed 200 OK in 7ms (Views: 6.4ms | ActiveRecord: 0.0ms)
12
-  (0.1ms) rollback transaction
13
-  (0.0ms) begin transaction
14
- Processing by PeopleController#create_with_permit as HTML
15
- Parameters: {"person"=>{"name"=>"Mjallo!"}}
16
- Completed 200 OK in 0ms (Views: 0.2ms | ActiveRecord: 0.0ms)
17
-  (0.0ms) rollback transaction
18
-  (0.3ms) begin transaction
19
- Processing by PeopleController#create as HTML
20
- Parameters: {"user"=>{"name"=>"Mjallo!"}}
21
- Completed 500 Internal Server Error in 0ms
22
-  (0.1ms) rollback transaction
23
-  (0.0ms) begin transaction
24
- Processing by PeopleController#create as HTML
25
- Parameters: {"person"=>{"name"=>"Mjallo!"}}
26
- Completed 500 Internal Server Error in 8ms
27
-  (0.1ms) rollback transaction
28
-  (0.2ms) begin transaction
29
- Processing by PeopleController#create as HTML
30
- Parameters: {"user"=>{"name"=>"Mjallo!"}}
31
- Completed 500 Internal Server Error in 0ms
32
-  (0.1ms) rollback transaction
33
-  (0.0ms) begin transaction
34
- Processing by PeopleController#create as HTML
35
- Parameters: {"person"=>{"name"=>"Mjallo!"}}
36
- Completed 200 OK in 0ms (ActiveRecord: 0.0ms)
37
-  (0.0ms) rollback transaction
38
-  (0.3ms) begin transaction
39
- Processing by PeopleController#create as HTML
40
- Parameters: {"user"=>{"name"=>"Mjallo!"}}
41
- Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)
42
-  (0.1ms) rollback transaction
43
-  (0.1ms) begin transaction
44
- Processing by PeopleController#create as HTML
45
- Parameters: {"person"=>{"name"=>"Mjallo!"}}
46
- Completed 200 OK in 0ms (ActiveRecord: 0.0ms)
47
-  (0.0ms) rollback transaction
48
-  (0.3ms) begin transaction
49
- Processing by PeopleController#create as HTML
50
- Parameters: {"user"=>{"name"=>"Mjallo!"}}
51
- Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)
52
-  (0.1ms) rollback transaction
53
-  (0.0ms) begin transaction
54
- Processing by PeopleController#create as HTML
55
- Parameters: {"person"=>{"name"=>"Mjallo!"}}
56
- Completed 200 OK in 0ms (ActiveRecord: 0.0ms)
57
-  (0.0ms) rollback transaction
58
-  (0.3ms) begin transaction
59
-  (0.0ms) rollback transaction
60
-  (0.2ms) begin transaction
61
-  (0.0ms) rollback transaction
62
-  (0.3ms) begin transaction
63
-  (0.0ms) rollback transaction
64
-  (0.2ms) begin transaction
65
-  (0.0ms) rollback transaction
66
-  (0.3ms) begin transaction
67
-  (0.0ms) rollback transaction
68
-  (0.3ms) begin transaction
69
-  (0.0ms) rollback transaction
70
-  (0.3ms) begin transaction
71
-  (0.0ms) rollback transaction
72
-  (0.3ms) begin transaction
73
-  (0.0ms) rollback transaction
74
-  (0.2ms) begin transaction
75
-  (0.0ms) rollback transaction
76
-  (0.2ms) begin transaction
77
-  (0.0ms) rollback transaction
78
-  (0.3ms) begin transaction
79
-  (0.0ms) rollback transaction
80
-  (0.2ms) begin transaction
81
-  (0.0ms) rollback transaction
82
-  (0.3ms) begin transaction
83
-  (0.0ms) rollback transaction
84
-  (0.3ms) begin transaction
85
-  (0.0ms) rollback transaction
86
-  (0.2ms) begin transaction
87
-  (0.0ms) rollback transaction
88
-  (0.0ms) begin transaction
89
-  (0.0ms) rollback transaction
90
-  (0.3ms) begin transaction
91
-  (0.0ms) rollback transaction
92
-  (0.0ms) begin transaction
93
-  (0.0ms) rollback transaction
94
-  (0.0ms) begin transaction
95
-  (0.0ms) rollback transaction
96
-  (0.3ms) begin transaction
97
-  (0.0ms) rollback transaction
98
-  (0.0ms) begin transaction
99
-  (0.0ms) rollback transaction
100
-  (0.0ms) begin transaction
101
-  (0.0ms) rollback transaction
102
-  (0.2ms) begin transaction
103
-  (0.0ms) rollback transaction
104
-  (0.0ms) begin transaction
105
-  (0.0ms) rollback transaction
106
-  (0.0ms) begin transaction
107
-  (0.0ms) rollback transaction
108
-  (0.3ms) begin transaction
109
-  (0.0ms) rollback transaction
110
-  (0.0ms) begin transaction
111
-  (0.0ms) rollback transaction
112
-  (0.0ms) begin transaction
113
-  (0.0ms) rollback transaction
114
-  (0.2ms) begin transaction
115
-  (0.0ms) rollback transaction
116
-  (0.0ms) begin transaction
117
-  (0.0ms) rollback transaction
118
-  (0.0ms) begin transaction
119
-  (0.0ms) rollback transaction
120
-  (0.2ms) begin transaction
121
-  (0.0ms) rollback transaction
122
-  (0.0ms) begin transaction
123
-  (0.0ms) rollback transaction
124
-  (0.0ms) begin transaction
125
-  (0.0ms) rollback transaction
126
-  (0.3ms) begin transaction
127
-  (0.0ms) rollback transaction
128
-  (0.0ms) begin transaction
129
-  (0.0ms) rollback transaction
130
-  (0.0ms) begin transaction
131
-  (0.0ms) rollback transaction
132
-  (0.3ms) begin transaction
133
-  (0.0ms) rollback transaction
134
-  (0.0ms) begin transaction
135
-  (0.0ms) rollback transaction
136
-  (0.0ms) begin transaction
137
-  (0.0ms) rollback transaction
138
-  (0.2ms) begin transaction
139
-  (0.0ms) rollback transaction
140
-  (0.0ms) begin transaction
141
-  (0.0ms) rollback transaction
142
-  (0.0ms) begin transaction
143
-  (0.0ms) rollback transaction
144
-  (0.3ms) begin transaction
145
-  (0.0ms) rollback transaction
146
-  (0.0ms) begin transaction
147
-  (0.0ms) rollback transaction
148
-  (0.0ms) begin transaction
149
-  (0.0ms) rollback transaction
150
-  (0.2ms) begin transaction
151
-  (0.0ms) rollback transaction
152
-  (0.0ms) begin transaction
153
-  (0.0ms) rollback transaction
154
-  (0.0ms) begin transaction
155
-  (0.0ms) rollback transaction
156
-  (0.3ms) begin transaction
157
-  (0.0ms) rollback transaction
158
-  (0.0ms) begin transaction
159
-  (0.0ms) rollback transaction
160
-  (0.0ms) begin transaction
161
-  (0.0ms) rollback transaction
162
-  (0.3ms) begin transaction
163
-  (0.0ms) rollback transaction
164
-  (0.0ms) begin transaction
165
-  (0.0ms) rollback transaction
166
-  (0.0ms) begin transaction
167
-  (0.0ms) rollback transaction
168
-  (0.0ms) begin transaction
169
-  (0.0ms) rollback transaction
170
-  (0.3ms) begin transaction
171
-  (0.0ms) rollback transaction
172
-  (0.0ms) begin transaction
173
-  (0.0ms) rollback transaction
174
-  (0.0ms) begin transaction
175
-  (0.0ms) rollback transaction
176
-  (0.0ms) begin transaction
177
-  (0.0ms) rollback transaction
178
-  (0.2ms) begin transaction
179
-  (0.0ms) rollback transaction
180
-  (0.0ms) begin transaction
181
-  (0.0ms) rollback transaction
182
-  (0.0ms) begin transaction
183
-  (0.0ms) rollback transaction
184
-  (0.0ms) begin transaction
185
-  (0.0ms) rollback transaction
186
-  (0.3ms) begin transaction
187
-  (0.0ms) rollback transaction
188
-  (0.0ms) begin transaction
189
-  (0.0ms) rollback transaction
190
-  (0.0ms) begin transaction
191
-  (0.0ms) rollback transaction
192
-  (0.0ms) begin transaction
193
-  (0.0ms) rollback transaction
194
-  (0.3ms) begin transaction
195
-  (0.0ms) rollback transaction
196
-  (0.0ms) begin transaction
197
-  (0.0ms) rollback transaction
198
-  (0.0ms) begin transaction
199
-  (0.0ms) rollback transaction
200
-  (0.0ms) begin transaction
201
-  (0.0ms) rollback transaction
202
-  (0.2ms) begin transaction
203
- Processing by PeopleController#create as HTML
204
- Parameters: {"user"=>{"name"=>"Mjallo!"}}
205
- Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)
206
-  (0.1ms) rollback transaction
207
-  (0.1ms) begin transaction
208
- Processing by PeopleController#create as HTML
209
- Parameters: {"person"=>{"name"=>"Mjallo!"}}
210
- Completed 200 OK in 0ms (ActiveRecord: 0.0ms)
211
-  (0.0ms) rollback transaction
212
-  (0.3ms) begin transaction
213
-  (0.0ms) rollback transaction
214
-  (0.0ms) begin transaction
215
-  (0.0ms) rollback transaction
216
-  (0.0ms) begin transaction
217
-  (0.0ms) rollback transaction
218
-  (0.0ms) begin transaction
219
-  (0.0ms) rollback transaction