genderize 0.1.0 → 0.1.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: 2ee1ba31da4da138caff5ae82d75060bc9b7a65e
4
- data.tar.gz: 02a6a2d5a0894b28b546db7fdedee478c9fe2a1d
3
+ metadata.gz: 7c4935deed140cf4478eb3ab69b61960adec5d08
4
+ data.tar.gz: cc9f706716aa6acb17ad396fd15d5d2152d4adc4
5
5
  SHA512:
6
- metadata.gz: 949548a45ebe65219d834b7d9f8e3a92f3ed525ac67cb38570d8580d0d97fd474cc832c71f5e8af49e3fb7b46b480af53f52ba29c0b18fe291850992a9cff94d
7
- data.tar.gz: 1b8c9cac5895dd580e0ab0733c45ed77d7be7c085be9e8bf9f22ce03e4ee0ce46de3fea67c02309802860152d4f3f5665d93a510ea2b81dd82a2389f859467ab
6
+ metadata.gz: b3b04de5a181215068018dbc54297ffbfcecc865c3ad58dcd415de29e5486613677d8b3c2833d8ddac9bfa56e5c5318c5309dc7faed9f2795e29e3056465343e
7
+ data.tar.gz: 51bd2f07b9d9ee30dd04f01bdde64e1978d87fce510f6746bc1c7f4fc810d5cf7937d091432836a2bf7ec59c84058a131ad2459d6fe94304fc6b708f8a76a4a3
data/README.md CHANGED
@@ -2,7 +2,9 @@
2
2
 
3
3
  Genderize is a simple Rails gem for adding gender helper methods to Rails models.
4
4
 
5
- _New:_ we now have non-binary as an option
5
+ _New:_
6
+ - (0.1.1) options to coerce invalid input to nil or to coerce empty string to nil
7
+ - (0.1.0) we now have non-binary as an option
6
8
 
7
9
  ## Example
8
10
 
@@ -147,7 +149,17 @@ Finally, to *genderize* a model attribute:
147
149
  # ... or, if your db column isn't named `gender`
148
150
  genderize(:user_gender)
149
151
 
150
- end
152
+ ### New opts (must specify column name to use)
153
+ # ... to prevent storing empty strings and store them as nil instead
154
+ genderize(:gender, no_empty_string: true)
155
+
156
+ # ... to coerce invalid arguments to nil rather than throwing ArgumentError
157
+ genderize(:gender, set_invalid_to_nil: true)
158
+
159
+ # ... these can be combined together
160
+ genderize(:gender, set_invalid_to_nil: true, no_empty_string: true)
161
+
162
+ end
151
163
 
152
164
 
153
165
  ## Issues
@@ -14,13 +14,25 @@ module Genderize
14
14
  module ClassMethods
15
15
 
16
16
 
17
- def genderize(col_name = "gender")
17
+ def genderize(col_name = "gender", opts = {})
18
18
  # Reads the DB column value for gender attribute and creates a new Gender
19
19
  # object with it's value
20
20
  #
21
21
  # The object is memoized for future calls.
22
22
  #
23
+ # col_name - String or Symbol name of gender column (default 'gender')
24
+ #
25
+ # opts - Hash options to handle storage and initialization scenarios:
26
+ # :no_empty_string - Boolean. If true, stores empty string as nil
27
+ # :set_invalid_to_nil - Boolean. If true, sets the gender to be
28
+ # an unknown Gender instead of throwing an
29
+ # ArgumentError
30
+ #
23
31
  # Returns a Gender
32
+
33
+ no_empty_string = !!opts[:no_empty_string] || false
34
+ set_invalid_to_nil = !!opts[:set_invalid_to_nil] || false
35
+
24
36
  define_method col_name do
25
37
  current_value = instance_variable_get("@#{col_name}")
26
38
  persist_value = Genderize::Gender.new(read_attribute(col_name))
@@ -30,16 +42,25 @@ module Genderize
30
42
  # Writes to the DB column the new value for the gender attribute
31
43
  # Sets the instance varaible value too
32
44
  #
33
- # string - A String indicating the gender. Must be either 'm', "M", 'f' or "F".
45
+ # string - A String indicating the gender. Valid parameters must have
46
+ # first letter be 'm', 'n', 'f' or ''. Case insensitive.
34
47
  #
35
- # Raises ArgumentError if gender is not a single alphanumeric character "m" or "f"
48
+ # Raises ArgumentError if gender isn't valid and set_invalid_to_nil is false
36
49
  define_method "#{col_name}=" do |string|
37
50
  string = string.to_s.first
38
- unless string.to_s =~ /\A(m|f|n|)\Z/i
39
- raise ArgumentError, "Gender must be one of '', 'n', 'm', or 'f'"
51
+ valid = string.to_s =~ /\A(m|f|n|)\Z/i
52
+
53
+ unless valid
54
+ if set_invalid_to_nil
55
+ string = nil
56
+ else
57
+ raise ArgumentError, "Gender must be one of '', 'n', 'm', or 'f'"
58
+ end
40
59
  end
41
- write_attribute(col_name, string)
42
60
 
61
+ string = nil if (string == '' and no_empty_string)
62
+
63
+ write_attribute(col_name, string)
43
64
  instance_variable_set("@#{col_name}", Genderize::Gender.new(read_attribute(col_name)))
44
65
  end
45
66
 
@@ -1,3 +1,3 @@
1
1
  module Genderize
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -0,0 +1,5 @@
1
+ class UserWithOpt < ActiveRecord::Base
2
+ attr_accessible :gender
3
+
4
+ genderize(:gender, set_invalid_to_nil: true, no_empty_string: true)
5
+ end
@@ -0,0 +1,9 @@
1
+ class CreateUserWithOpts < ActiveRecord::Migration
2
+ def change
3
+ create_table :user_with_opts do |t|
4
+ t.string :gender
5
+
6
+ t.timestamps null: false
7
+ end
8
+ end
9
+ end
@@ -11,7 +11,13 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20130506080641) do
14
+ ActiveRecord::Schema.define(version: 20171122004630) do
15
+
16
+ create_table "user_with_opts", force: :cascade do |t|
17
+ t.string "gender"
18
+ t.datetime "created_at", null: false
19
+ t.datetime "updated_at", null: false
20
+ end
15
21
 
16
22
  create_table "users", force: :cascade do |t|
17
23
  t.string "name", limit: 20, null: false
Binary file
@@ -52,6 +52,26 @@ describe User, type: :model do
52
52
  it "should be blank?" do
53
53
  expect(user.gender).to be_blank
54
54
  end
55
+
56
+ it "should keep the stored value as empty string" do
57
+ expect(user[:gender]).to eql("")
58
+ end
59
+ end
60
+
61
+ context "when null" do
62
+ let(:gender) { nil }
63
+
64
+ it "should return a Gender object" do
65
+ expect(user.gender).to be_an_instance_of(Genderize::Gender)
66
+ end
67
+
68
+ it "should be blank?" do
69
+ expect(user.gender).to be_blank
70
+ end
71
+
72
+ it "should keep the stored value as empty string" do
73
+ expect(user[:gender]).to eql("")
74
+ end
55
75
  end
56
76
 
57
77
  context "when changed" do
@@ -0,0 +1,65 @@
1
+ require 'spec_helper'
2
+
3
+ describe UserWithOpt, type: :model do
4
+
5
+ describe "gender" do
6
+
7
+ let(:user) { UserWithOpt.new(gender: gender) }
8
+
9
+ context "testing :no_empty_string" do
10
+ context "when blank" do
11
+ let(:gender) { "" }
12
+
13
+ it "should return a Gender object" do
14
+ expect(user.gender).to be_an_instance_of(Genderize::Gender)
15
+ end
16
+
17
+ it "should be blank?" do
18
+ expect(user.gender).to be_blank
19
+ end
20
+
21
+ it "should keep the stored value as nil" do
22
+ expect(user[:gender]).to be_nil
23
+ end
24
+ end
25
+
26
+ context "when nil" do
27
+ let(:gender) { nil }
28
+
29
+ it "should return a Gender object" do
30
+ expect(user.gender).to be_an_instance_of(Genderize::Gender)
31
+ end
32
+
33
+ it "should be blank?" do
34
+ expect(user.gender).to be_blank
35
+ end
36
+
37
+ it "should keep the stored value as nil" do
38
+ expect(user[:gender]).to be_nil
39
+ end
40
+ end
41
+ end
42
+
43
+ context "testing :set_invalid_to_nil" do
44
+
45
+ context "when something unexpected" do
46
+ let(:gender) { "something unexpected" }
47
+
48
+ it "should return a Gender object" do
49
+ expect(user.gender).to be_an_instance_of(Genderize::Gender)
50
+ end
51
+
52
+ it "should be blank?" do
53
+ expect(user.gender).to be_blank
54
+ end
55
+
56
+ it "should keep the stored value as nil" do
57
+ expect(user[:gender]).to be_nil
58
+ end
59
+ end
60
+
61
+ end
62
+
63
+ end
64
+
65
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: genderize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bodacious
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-18 00:00:00.000000000 Z
11
+ date: 2017-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -92,6 +92,7 @@ files:
92
92
  - spec/dummy/Rakefile
93
93
  - spec/dummy/app/helpers/users_helper.rb
94
94
  - spec/dummy/app/models/user.rb
95
+ - spec/dummy/app/models/user_with_opt.rb
95
96
  - spec/dummy/app/views/users/_form.html.erb
96
97
  - spec/dummy/app/views/users/edit.html.erb
97
98
  - spec/dummy/app/views/users/index.html.erb
@@ -115,12 +116,12 @@ files:
115
116
  - spec/dummy/config/routes.rb
116
117
  - spec/dummy/db/development.sqlite3
117
118
  - spec/dummy/db/migrate/20130506080641_create_users.rb
119
+ - spec/dummy/db/migrate/20171122004630_create_user_with_opts.rb
118
120
  - spec/dummy/db/schema.rb
119
121
  - spec/dummy/db/test.sqlite3
120
- - spec/dummy/log/development.log
121
- - spec/dummy/log/test.log
122
122
  - spec/dummy/script/rails
123
123
  - spec/dummy/spec/models/user_spec.rb
124
+ - spec/dummy/spec/models/user_with_opt_spec.rb
124
125
  - spec/genderize_spec.rb
125
126
  - spec/lib/gender_spec.rb
126
127
  - spec/spec_helper.rb
@@ -150,40 +151,41 @@ signing_key:
150
151
  specification_version: 4
151
152
  summary: A helpful class for gender-specific models in Ruby applications
152
153
  test_files:
153
- - spec/dummy/app/helpers/users_helper.rb
154
+ - spec/spec_helper.rb
155
+ - spec/genderize_spec.rb
156
+ - spec/dummy/app/models/user_with_opt.rb
154
157
  - spec/dummy/app/models/user.rb
155
- - spec/dummy/app/views/users/_form.html.erb
156
- - spec/dummy/app/views/users/edit.html.erb
157
158
  - spec/dummy/app/views/users/index.html.erb
158
- - spec/dummy/app/views/users/new.html.erb
159
+ - spec/dummy/app/views/users/edit.html.erb
159
160
  - spec/dummy/app/views/users/show.html.erb
160
- - spec/dummy/config/application.rb
161
- - spec/dummy/config/boot.rb
162
- - spec/dummy/config/database.yml
163
- - spec/dummy/config/environment.rb
164
- - spec/dummy/config/environments/development.rb
161
+ - spec/dummy/app/views/users/_form.html.erb
162
+ - spec/dummy/app/views/users/new.html.erb
163
+ - spec/dummy/app/helpers/users_helper.rb
164
+ - spec/dummy/config/routes.rb
165
+ - spec/dummy/config/locales/en.yml
165
166
  - spec/dummy/config/environments/production.rb
167
+ - spec/dummy/config/environments/development.rb
166
168
  - spec/dummy/config/environments/test.rb
169
+ - spec/dummy/config/environment.rb
170
+ - spec/dummy/config/application.rb
171
+ - spec/dummy/config/database.yml
172
+ - spec/dummy/config/boot.rb
167
173
  - spec/dummy/config/initializers/backtrace_silencers.rb
168
- - spec/dummy/config/initializers/inflections.rb
169
174
  - spec/dummy/config/initializers/mime_types.rb
170
- - spec/dummy/config/initializers/secret_token.rb
171
175
  - spec/dummy/config/initializers/session_store.rb
172
176
  - spec/dummy/config/initializers/wrap_parameters.rb
173
- - spec/dummy/config/locales/en.yml
174
- - spec/dummy/config/routes.rb
177
+ - spec/dummy/config/initializers/secret_token.rb
178
+ - spec/dummy/config/initializers/inflections.rb
175
179
  - spec/dummy/config.ru
176
- - spec/dummy/db/development.sqlite3
177
- - spec/dummy/db/migrate/20130506080641_create_users.rb
180
+ - spec/dummy/spec/models/user_with_opt_spec.rb
181
+ - spec/dummy/spec/models/user_spec.rb
182
+ - spec/dummy/script/rails
183
+ - spec/dummy/Rakefile
178
184
  - spec/dummy/db/schema.rb
179
185
  - spec/dummy/db/test.sqlite3
180
- - spec/dummy/log/development.log
181
- - spec/dummy/log/test.log
182
- - spec/dummy/Rakefile
186
+ - spec/dummy/db/migrate/20171122004630_create_user_with_opts.rb
187
+ - spec/dummy/db/migrate/20130506080641_create_users.rb
188
+ - spec/dummy/db/development.sqlite3
183
189
  - spec/dummy/README.rdoc
184
- - spec/dummy/script/rails
185
- - spec/dummy/spec/models/user_spec.rb
186
- - spec/genderize_spec.rb
187
- - spec/lib/gender_spec.rb
188
- - spec/spec_helper.rb
189
190
  - spec/support/deferred_garbage_collection.rb
191
+ - spec/lib/gender_spec.rb
@@ -1,24 +0,0 @@
1
- DEPRECATION WARNING: config.active_record.whitelist_attributes is deprecated and have no effect. Remove its call from the configuration. (called from block in tsort_each at /Users/Gavin/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:228)
2
-  (2.5ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
3
-  (0.3ms) select sqlite_version(*)
4
-  (0.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
5
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
6
- Migrating to CreateUsers (20130506080641)
7
-  (0.1ms) begin transaction
8
- DEPRECATION WARNING: `#timestamps` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in change at /Users/Gavin/Clients/KatanaCode/genderize/spec/dummy/db/migrate/20130506080641_create_users.rb:8)
9
-  (0.5ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(20) NOT NULL, "gender" varchar(1) NOT NULL, "created_at" datetime, "updated_at" datetime)
10
- SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130506080641"]]
11
-  (0.7ms) commit transaction
12
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
13
- DEPRECATION WARNING: config.active_record.whitelist_attributes is deprecated and have no effect. Remove its call from the configuration. (called from block in tsort_each at /Users/Gavin/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:228)
14
-  (2.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
15
-  (0.1ms) select sqlite_version(*)
16
-  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
17
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
18
- Migrating to CreateUsers (20130506080641)
19
-  (0.1ms) begin transaction
20
- DEPRECATION WARNING: `#timestamps` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in change at /Users/Gavin/Clients/KatanaCode/genderize/spec/dummy/db/migrate/20130506080641_create_users.rb:8)
21
-  (0.3ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(20) NOT NULL, "gender" varchar(1) NOT NULL, "created_at" datetime, "updated_at" datetime)
22
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130506080641"]]
23
-  (0.7ms) commit transaction
24
- ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
@@ -1,78 +0,0 @@
1
-  (2.6ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
2
-  (0.0ms) select sqlite_version(*)
3
-  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
4
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
5
- Migrating to CreateUsers (20130506080641)
6
-  (0.0ms) begin transaction
7
-  (0.3ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(20) NOT NULL, "gender" varchar(1) NOT NULL, "created_at" datetime, "updated_at" datetime)
8
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20130506080641"]]
9
-  (0.5ms) commit transaction
10
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
11
-  (0.0ms) begin transaction
12
- SQL (0.3ms) INSERT INTO "users" ("name", "gender", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "f"], ["gender", "f"], ["created_at", "2016-05-27 13:22:21.503307"], ["updated_at", "2016-05-27 13:22:21.503307"]]
13
-  (2.7ms) commit transaction
14
- User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1
15
-  (0.0ms) begin transaction
16
- SQL (0.4ms) INSERT INTO "users" ("name", "gender", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "f"], ["gender", "f"], ["created_at", "2016-05-27 13:22:53.702225"], ["updated_at", "2016-05-27 13:22:53.702225"]]
17
-  (2.5ms) commit transaction
18
- User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1
19
-  (0.1ms) begin transaction
20
- SQL (0.3ms) INSERT INTO "users" ("name", "gender", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "f"], ["gender", "f"], ["created_at", "2016-05-27 13:28:16.419497"], ["updated_at", "2016-05-27 13:28:16.419497"]]
21
-  (2.4ms) commit transaction
22
- User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1
23
-  (0.0ms) begin transaction
24
- SQL (0.3ms) INSERT INTO "users" ("name", "gender", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "f"], ["gender", "f"], ["created_at", "2016-05-27 13:29:04.891644"], ["updated_at", "2016-05-27 13:29:04.891644"]]
25
-  (2.5ms) commit transaction
26
- User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1
27
-  (0.0ms) begin transaction
28
- SQL (0.3ms) INSERT INTO "users" ("name", "gender", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "f"], ["gender", "f"], ["created_at", "2016-05-27 13:29:41.054526"], ["updated_at", "2016-05-27 13:29:41.054526"]]
29
-  (2.7ms) commit transaction
30
- User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1
31
-  (0.0ms) begin transaction
32
- SQL (0.3ms) INSERT INTO "users" ("name", "gender", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "f"], ["gender", "f"], ["created_at", "2016-05-27 13:30:10.725246"], ["updated_at", "2016-05-27 13:30:10.725246"]]
33
-  (2.6ms) commit transaction
34
- User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1
35
-  (0.0ms) begin transaction
36
- SQL (0.3ms) INSERT INTO "users" ("name", "gender", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "f"], ["gender", "f"], ["created_at", "2016-05-27 13:31:19.111752"], ["updated_at", "2016-05-27 13:31:19.111752"]]
37
-  (2.4ms) commit transaction
38
- User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1
39
-  (0.0ms) begin transaction
40
- SQL (0.3ms) INSERT INTO "users" ("name", "gender", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "f"], ["gender", "f"], ["created_at", "2016-05-27 13:31:42.590594"], ["updated_at", "2016-05-27 13:31:42.590594"]]
41
-  (2.6ms) commit transaction
42
- User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1
43
-  (0.0ms) begin transaction
44
- SQL (0.3ms) INSERT INTO "users" ("name", "gender", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "f"], ["gender", "f"], ["created_at", "2016-05-27 13:31:58.855684"], ["updated_at", "2016-05-27 13:31:58.855684"]]
45
-  (2.2ms) commit transaction
46
- User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1
47
-  (0.0ms) begin transaction
48
- SQL (0.3ms) INSERT INTO "users" ("name", "gender", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "f"], ["gender", "f"], ["created_at", "2016-05-27 13:32:11.842003"], ["updated_at", "2016-05-27 13:32:11.842003"]]
49
-  (2.4ms) commit transaction
50
- User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1
51
-  (0.0ms) begin transaction
52
- SQL (0.3ms) INSERT INTO "users" ("name", "gender", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "f"], ["gender", "f"], ["created_at", "2016-05-27 13:32:49.476375"], ["updated_at", "2016-05-27 13:32:49.476375"]]
53
-  (2.6ms) commit transaction
54
- User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1
55
-  (0.0ms) begin transaction
56
- SQL (0.3ms) INSERT INTO "users" ("name", "gender", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "f"], ["gender", "f"], ["created_at", "2016-05-27 13:33:00.356946"], ["updated_at", "2016-05-27 13:33:00.356946"]]
57
-  (2.5ms) commit transaction
58
- User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1
59
-  (0.1ms) begin transaction
60
- SQL (0.4ms) INSERT INTO "users" ("name", "gender", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "f"], ["gender", "f"], ["created_at", "2016-05-27 13:56:15.467527"], ["updated_at", "2016-05-27 13:56:15.467527"]]
61
-  (0.5ms) commit transaction
62
- User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1
63
-  (0.0ms) begin transaction
64
- SQL (0.3ms) INSERT INTO "users" ("name", "gender", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "f"], ["gender", "f"], ["created_at", "2016-05-27 13:57:19.171265"], ["updated_at", "2016-05-27 13:57:19.171265"]]
65
-  (2.4ms) commit transaction
66
- User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1
67
-  (0.0ms) begin transaction
68
- SQL (0.4ms) INSERT INTO "users" ("name", "gender", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "f"], ["gender", "f"], ["created_at", "2016-05-27 13:57:59.175258"], ["updated_at", "2016-05-27 13:57:59.175258"]]
69
-  (2.3ms) commit transaction
70
- User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1
71
-  (0.0ms) begin transaction
72
- SQL (0.4ms) INSERT INTO "users" ("name", "gender", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "f"], ["gender", "f"], ["created_at", "2016-05-27 13:58:25.137246"], ["updated_at", "2016-05-27 13:58:25.137246"]]
73
-  (2.4ms) commit transaction
74
- User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1
75
-  (0.1ms) begin transaction
76
- SQL (0.4ms) INSERT INTO "users" ("name", "gender", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "f"], ["gender", "f"], ["created_at", "2016-05-27 13:58:39.130168"], ["updated_at", "2016-05-27 13:58:39.130168"]]
77
-  (2.4ms) commit transaction
78
- User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT 1