snf_core 0.2.99 → 0.3.0

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
  SHA256:
3
- metadata.gz: 06ef258596e99497b2a3f679b7cc72640b262d5305fdde5400d3a992469b7ca8
4
- data.tar.gz: 9c4a3819df5295dde947a09c2e2046510975ef5f5707bad6e5b267575e6d6019
3
+ metadata.gz: f22dd66f3a5b0d74ae9e2861c4e700fbe07526eec275c51943eb701451d92e1f
4
+ data.tar.gz: 33c322e0e4c72983d9ce4ff027861b74299a9cd13a8b6e2ac80a2cb034441bde
5
5
  SHA512:
6
- metadata.gz: 8260b98d145d7d4dc5053ff4c61c1b3279758287cf92c4757b92529bd5f303dda9d520d33aece739890cdb9661a4cedba4fbb7f5917aa8d8f89f97dee6e96475
7
- data.tar.gz: 6fa672ab9c77db1b963984b9596c475a05b4a7c490daed1e572d4354fda2a13ed4d2322da8948fcc7eca2a5346b4758becb24b9e164ab2f39056d041b0614225
6
+ metadata.gz: b4c0d27b9b9f687699e1ae64e6fbf469ca351b75d632399ad3ea9cdc316ba8cf7b07206bde77d997a1e800320cd018a928a7768b4bf3adb817836ba2baa16bd3
7
+ data.tar.gz: 4e45106323c448eb148cb21affb9f81f7bd88d2909bfb2c38a035f092c490842515d510486806c4458090c3d100f570ee258571278e954adf8960cc2ba5daf60
@@ -6,26 +6,37 @@ module SnfCore
6
6
  ActiveRecord::Base.transaction do
7
7
  @address = Address.new(address_params)
8
8
 
9
- @user = User.new(user_params)
10
- @user.address = @address
9
+ if @address.save
10
+ @user = User.new(user_params)
11
+ @user.address = @address
11
12
 
12
- if @user.save && @address.save
13
- @business = Business.new(
14
- user: @user,
15
- business_name: signup_params[:business_name],
16
- tin_number: signup_params[:tin_number],
17
- business_type: signup_params[:business_type]
18
- )
13
+ if @user.save
14
+ @business = Business.new(
15
+ user: @user,
16
+ business_name: signup_params[:business_name],
17
+ tin_number: signup_params[:tin_number],
18
+ business_type: signup_params[:business_type]
19
+ )
19
20
 
20
- if @business.save
21
- render json: { success: true }, status: :created
21
+ if @business.save
22
+ render json: {
23
+ success: true,
24
+ user: @user.as_json(except: [ :password_digest ]),
25
+ business: @business,
26
+ address: @address
27
+ }, status: :created
28
+ return
29
+ else
30
+ render json: { errors: @business.errors.full_messages }, status: :unprocessable_entity
31
+ raise ActiveRecord::Rollback
32
+ end
22
33
  else
34
+ render json: { errors: @user.errors.full_messages }, status: :unprocessable_entity
23
35
  raise ActiveRecord::Rollback
24
- render json: { errors: @business.errors.full_messages }, status: :unprocessable_entity
25
36
  end
26
37
  else
27
- errors = @user.errors.full_messages + @address.errors.full_messages
28
- render json: { errors: errors }, status: :unprocessable_entity
38
+ render json: { errors: @address.errors.full_messages }, status: :unprocessable_entity
39
+ raise ActiveRecord::Rollback
29
40
  end
30
41
  end
31
42
  end
@@ -59,7 +70,7 @@ module SnfCore
59
70
  :first_name, :middle_name, :last_name, :password,
60
71
  :phone_number, :business_name, :tin_number, :business_type,
61
72
  :date_of_birth, :nationality, :occupation, :source_of_funds, :kyc_status,
62
- :gender, :verified_at, :verified_by_id, :address_id
73
+ :gender, :verified_at, :verified_by_id, :email
63
74
  )
64
75
  end
65
76
 
@@ -68,7 +79,7 @@ module SnfCore
68
79
  :first_name, :middle_name, :last_name, :password,
69
80
  :phone_number, :date_of_birth, :nationality,
70
81
  :occupation, :source_of_funds, :kyc_status,
71
- :gender, :verified_at, :verified_by_id, :address_id
82
+ :gender, :verified_at, :verified_by_id, :email
72
83
  )
73
84
  end
74
85
 
@@ -1,3 +1,3 @@
1
1
  module SnfCore
2
- VERSION = "0.2.99"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -6348,3 +6348,136 @@ FOREIGN KEY ("user_id")
6348
6348
  ActiveRecord::InternalMetadata Update (0.5ms) UPDATE "ar_internal_metadata" SET "value" = 'test', "updated_at" = '2025-03-12 09:28:39.063516' WHERE "ar_internal_metadata"."key" = 'environment' /*application='Dummy'*/
6349
6349
  ActiveRecord::InternalMetadata Load (0.2ms) SELECT * FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = 'schema_sha1' ORDER BY "ar_internal_metadata"."key" ASC LIMIT 1 /*application='Dummy'*/
6350
6350
  ActiveRecord::InternalMetadata Create (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ('schema_sha1', 'ce684782ac0a2f19cbccaf01724c2ba2ab15f8bc', '2025-03-12 09:28:39.066619', '2025-03-12 09:28:39.066622') RETURNING "key" /*application='Dummy'*/
6351
+ Started POST "/auth/signup" for ::1 at 2025-03-12 12:40:17 +0300
6352
+ ActiveRecord::SchemaMigration Load (3.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
6353
+
6354
+ ActionController::RoutingError (No route matches [POST] "/auth/signup"):
6355
+
6356
+ Started POST "/snf_cre/auth/signup" for ::1 at 2025-03-12 12:40:42 +0300
6357
+
6358
+ ActionController::RoutingError (No route matches [POST] "/snf_cre/auth/signup"):
6359
+
6360
+ Started POST "/snf_core/auth/signup" for ::1 at 2025-03-12 12:40:48 +0300
6361
+ Processing by SnfCore::AuthController#signup as */*
6362
+ Parameters: {"user" => {"first_name" => "John", "middle_name" => "Michael", "last_name" => "Doe", "phone_number" => "+251911234567", "password" => "[FILTERED]", "business_name" => "Test Company", "tin_number" => "123456789", "business_type" => "retailer", "date_of_birth" => "1990-01-01", "gender" => "male", "nationality" => "Ethiopian", "occupation" => "Business Owner", "source_of_funds" => "Salary", "kyc_status" => "pending"}, "address" => {"address_type" => "home", "city" => "Addis Ababa", "sub_city" => "Bole", "woreda" => "03", "latitude" => "9.0222", "longitude" => "38.7468"}, "auth" => {"user" => {"first_name" => "John", "middle_name" => "Michael", "last_name" => "Doe", "phone_number" => "+251911234567", "password" => "[FILTERED]", "business_name" => "Test Company", "tin_number" => "123456789", "business_type" => "retailer", "date_of_birth" => "1990-01-01", "gender" => "male", "nationality" => "Ethiopian", "occupation" => "Business Owner", "source_of_funds" => "Salary", "kyc_status" => "pending"}, "address" => {"address_type" => "home", "city" => "Addis Ababa", "sub_city" => "Bole", "woreda" => "03", "latitude" => "9.0222", "longitude" => "38.7468"}}}
6363
+ TRANSACTION (0.2ms) BEGIN /*action='signup',application='Dummy',controller='auth'*/
6364
+ SnfCore::Address Create (5.8ms) INSERT INTO "snf_core_addresses" ("address_type", "city", "sub_city", "woreda", "latitude", "longitude", "created_at", "updated_at", "house_number") VALUES ('home', 'Addis Ababa', 'Bole', '03', 9.0222, 38.7468, '2025-03-12 09:40:48.778962', '2025-03-12 09:40:48.778962', NULL) RETURNING "id" /*action='signup',application='Dummy',controller='auth'*/
6365
+ SnfCore::User Exists? (2.2ms) SELECT 1 AS one FROM "snf_core_users" WHERE "snf_core_users"."phone_number" = '+251911234567' LIMIT 1 /*action='signup',application='Dummy',controller='auth'*/
6366
+ SnfCore::User Exists? (0.2ms) SELECT 1 AS one FROM "snf_core_users" WHERE "snf_core_users"."email" IS NULL LIMIT 1 /*action='signup',application='Dummy',controller='auth'*/
6367
+ SnfCore::User Create (2.5ms) INSERT INTO "snf_core_users" ("first_name", "middle_name", "last_name", "email", "phone_number", "created_at", "updated_at", "password_digest", "password_changed", "reset_password_token", "date_of_birth", "nationality", "occupation", "source_of_funds", "kyc_status", "gender", "verified_at", "verified_by_id", "address_id") VALUES ('John', 'Michael', 'Doe', NULL, '+251911234567', '2025-03-12 09:40:49.041028', '2025-03-12 09:40:49.041028', '$2a$12$mZzOA5gmdk.WkFCKJNV19OV.U6Pd6LoyqBjV4QmbXVFJ0r5mdU2cO', FALSE, NULL, '1990-01-01', 'Ethiopian', 'Business Owner', 'Salary', 0, 0, NULL, NULL, 1) RETURNING "id" /*action='signup',application='Dummy',controller='auth'*/
6368
+ SnfCore::Business Exists? (1.2ms) SELECT 1 AS one FROM "snf_core_businesses" WHERE "snf_core_businesses"."tin_number" = '123456789' LIMIT 1 /*action='signup',application='Dummy',controller='auth'*/
6369
+ SnfCore::Business Create (1.0ms) INSERT INTO "snf_core_businesses" ("user_id", "business_name", "tin_number", "business_type", "verified_at", "verification_status", "created_at", "updated_at") VALUES (1, 'Test Company', '123456789', 0, NULL, 0, '2025-03-12 09:40:49.058363', '2025-03-12 09:40:49.058363') RETURNING "id" /*action='signup',application='Dummy',controller='auth'*/
6370
+ TRANSACTION (1.7ms) COMMIT /*action='signup',application='Dummy',controller='auth'*/
6371
+ Completed 201 Created in 364ms (Views: 0.1ms | ActiveRecord: 62.6ms (6 queries, 0 cached) | GC: 0.0ms)
6372
+
6373
+
6374
+ SnfCore::Address Load (540.1ms) SELECT "snf_core_addresses".* FROM "snf_core_addresses" /* loading for pp */ LIMIT 11 /*application='Dummy'*/
6375
+ SnfCore::User Load (2.8ms) SELECT "snf_core_users".* FROM "snf_core_users" /* loading for pp */ LIMIT 11 /*application='Dummy'*/
6376
+ SnfCore::Business Load (4.4ms) SELECT "snf_core_businesses".* FROM "snf_core_businesses" /* loading for pp */ LIMIT 11 /*application='Dummy'*/
6377
+ Started POST "/snf_core/auth/signup" for ::1 at 2025-03-12 13:39:24 +0300
6378
+ ActiveRecord::SchemaMigration Load (2.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC /*application='Dummy'*/
6379
+ Processing by SnfCore::AuthController#signup as */*
6380
+ Parameters: {"user" => {"first_name" => "John", "middle_name" => "Michael", "last_name" => "Doe", "phone_number" => "+251911234567", "password" => "[FILTERED]", "business_name" => "Test Company", "tin_number" => "123456789", "business_type" => "retailer", "date_of_birth" => "1990-01-01", "gender" => "male", "nationality" => "Ethiopian", "occupation" => "Business Owner", "source_of_funds" => "Salary", "kyc_status" => "pending"}, "address" => {"address_type" => "home", "city" => "Addis Ababa", "sub_city" => "Bole", "woreda" => "03", "latitude" => "9.0222", "longitude" => "38.7468"}, "auth" => {"user" => {"first_name" => "John", "middle_name" => "Michael", "last_name" => "Doe", "phone_number" => "+251911234567", "password" => "[FILTERED]", "business_name" => "Test Company", "tin_number" => "123456789", "business_type" => "retailer", "date_of_birth" => "1990-01-01", "gender" => "male", "nationality" => "Ethiopian", "occupation" => "Business Owner", "source_of_funds" => "Salary", "kyc_status" => "pending"}, "address" => {"address_type" => "home", "city" => "Addis Ababa", "sub_city" => "Bole", "woreda" => "03", "latitude" => "9.0222", "longitude" => "38.7468"}}}
6381
+ TRANSACTION (0.1ms) BEGIN /*action='signup',application='Dummy',controller='auth'*/
6382
+ SnfCore::Address Create (9.4ms) INSERT INTO "snf_core_addresses" ("address_type", "city", "sub_city", "woreda", "latitude", "longitude", "created_at", "updated_at", "house_number") VALUES ('home', 'Addis Ababa', 'Bole', '03', 9.0222, 38.7468, '2025-03-12 10:39:24.313051', '2025-03-12 10:39:24.313051', NULL) RETURNING "id" /*action='signup',application='Dummy',controller='auth'*/
6383
+ SnfCore::User Exists? (0.9ms) SELECT 1 AS one FROM "snf_core_users" WHERE "snf_core_users"."phone_number" = '+251911234567' LIMIT 1 /*action='signup',application='Dummy',controller='auth'*/
6384
+ SnfCore::User Exists? (0.2ms) SELECT 1 AS one FROM "snf_core_users" WHERE "snf_core_users"."email" IS NULL LIMIT 1 /*action='signup',application='Dummy',controller='auth'*/
6385
+ TRANSACTION (0.1ms) ROLLBACK /*action='signup',application='Dummy',controller='auth'*/
6386
+ Completed 204 No Content in 317ms (ActiveRecord: 33.1ms (3 queries, 0 cached) | GC: 0.0ms)
6387
+
6388
+
6389
+ Started POST "/snf_core/auth/signup" for ::1 at 2025-03-12 13:39:30 +0300
6390
+ Processing by SnfCore::AuthController#signup as */*
6391
+ Parameters: {"user" => {"first_name" => "John", "middle_name" => "Michael", "last_name" => "Doe", "phone_number" => "+251911234567", "password" => "[FILTERED]", "business_name" => "Test Company", "tin_number" => "123456789", "business_type" => "retailer", "date_of_birth" => "1990-01-01", "gender" => "male", "nationality" => "Ethiopian", "occupation" => "Business Owner", "source_of_funds" => "Salary", "kyc_status" => "pending"}, "address" => {"address_type" => "home", "city" => "Addis Ababa", "sub_city" => "Bole", "woreda" => "03", "latitude" => "9.0222", "longitude" => "38.7468"}, "auth" => {"user" => {"first_name" => "John", "middle_name" => "Michael", "last_name" => "Doe", "phone_number" => "+251911234567", "password" => "[FILTERED]", "business_name" => "Test Company", "tin_number" => "123456789", "business_type" => "retailer", "date_of_birth" => "1990-01-01", "gender" => "male", "nationality" => "Ethiopian", "occupation" => "Business Owner", "source_of_funds" => "Salary", "kyc_status" => "pending"}, "address" => {"address_type" => "home", "city" => "Addis Ababa", "sub_city" => "Bole", "woreda" => "03", "latitude" => "9.0222", "longitude" => "38.7468"}}}
6392
+ TRANSACTION (0.3ms) BEGIN /*action='signup',application='Dummy',controller='auth'*/
6393
+ SnfCore::Address Create (2.4ms) INSERT INTO "snf_core_addresses" ("address_type", "city", "sub_city", "woreda", "latitude", "longitude", "created_at", "updated_at", "house_number") VALUES ('home', 'Addis Ababa', 'Bole', '03', 9.0222, 38.7468, '2025-03-12 10:39:30.274588', '2025-03-12 10:39:30.274588', NULL) RETURNING "id" /*action='signup',application='Dummy',controller='auth'*/
6394
+ SnfCore::User Exists? (0.4ms) SELECT 1 AS one FROM "snf_core_users" WHERE "snf_core_users"."phone_number" = '+251911234567' LIMIT 1 /*action='signup',application='Dummy',controller='auth'*/
6395
+ SnfCore::User Exists? (0.2ms) SELECT 1 AS one FROM "snf_core_users" WHERE "snf_core_users"."email" IS NULL LIMIT 1 /*action='signup',application='Dummy',controller='auth'*/
6396
+ TRANSACTION (0.2ms) ROLLBACK /*action='signup',application='Dummy',controller='auth'*/
6397
+ Completed 204 No Content in 252ms (ActiveRecord: 3.3ms (3 queries, 0 cached) | GC: 0.0ms)
6398
+
6399
+
6400
+ Started POST "/snf_core/auth/signup" for ::1 at 2025-03-12 13:39:38 +0300
6401
+ Processing by SnfCore::AuthController#signup as */*
6402
+ Parameters: {"user" => {"first_name" => "John", "middle_name" => "Michael", "last_name" => "Doe", "phone_number" => "+251911234567", "password" => "[FILTERED]", "business_name" => "Test Company", "tin_number" => "123456789", "business_type" => "retailer", "date_of_birth" => "1990-01-01", "gender" => "male", "nationality" => "Ethiopian", "occupation" => "Business Owner", "source_of_funds" => "Salary", "kyc_status" => "pending"}, "address" => {"address_type" => "home", "city" => "Addis Ababa", "sub_city" => "Bole", "woreda" => "03", "latitude" => "9.0222", "longitude" => "38.7468"}, "auth" => {"user" => {"first_name" => "John", "middle_name" => "Michael", "last_name" => "Doe", "phone_number" => "+251911234567", "password" => "[FILTERED]", "business_name" => "Test Company", "tin_number" => "123456789", "business_type" => "retailer", "date_of_birth" => "1990-01-01", "gender" => "male", "nationality" => "Ethiopian", "occupation" => "Business Owner", "source_of_funds" => "Salary", "kyc_status" => "pending"}, "address" => {"address_type" => "home", "city" => "Addis Ababa", "sub_city" => "Bole", "woreda" => "03", "latitude" => "9.0222", "longitude" => "38.7468"}}}
6403
+ TRANSACTION (0.3ms) BEGIN /*action='signup',application='Dummy',controller='auth'*/
6404
+ SnfCore::Address Create (2.0ms) INSERT INTO "snf_core_addresses" ("address_type", "city", "sub_city", "woreda", "latitude", "longitude", "created_at", "updated_at", "house_number") VALUES ('home', 'Addis Ababa', 'Bole', '03', 9.0222, 38.7468, '2025-03-12 10:39:38.710777', '2025-03-12 10:39:38.710777', NULL) RETURNING "id" /*action='signup',application='Dummy',controller='auth'*/
6405
+ SnfCore::User Exists? (0.8ms) SELECT 1 AS one FROM "snf_core_users" WHERE "snf_core_users"."phone_number" = '+251911234567' LIMIT 1 /*action='signup',application='Dummy',controller='auth'*/
6406
+ SnfCore::User Exists? (0.2ms) SELECT 1 AS one FROM "snf_core_users" WHERE "snf_core_users"."email" IS NULL LIMIT 1 /*action='signup',application='Dummy',controller='auth'*/
6407
+ TRANSACTION (0.2ms) ROLLBACK /*action='signup',application='Dummy',controller='auth'*/
6408
+ Completed 204 No Content in 252ms (ActiveRecord: 3.4ms (3 queries, 0 cached) | GC: 0.0ms)
6409
+
6410
+
6411
+ Started POST "/snf_core/auth/signup" for ::1 at 2025-03-12 13:40:25 +0300
6412
+ Processing by SnfCore::AuthController#signup as HTML
6413
+ Parameters: {"user" => {"first_name" => "John", "middle_name" => "Michael", "last_name" => "Doe", "phone_number" => "+251911234567", "password" => "[FILTERED]", "business_name" => "Test Company", "tin_number" => "123456789", "business_type" => "retailer", "date_of_birth" => "1990-01-01", "gender" => "male", "nationality" => "Ethiopian", "occupation" => "Business Owner", "source_of_funds" => "Salary", "kyc_status" => "pending"}, "address" => {"address_type" => "home", "city" => "Addis Ababa", "sub_city" => "Bole", "woreda" => "03", "latitude" => "9.0222", "longitude" => "38.7468"}, "auth" => {"user" => {"first_name" => "John", "middle_name" => "Michael", "last_name" => "Doe", "phone_number" => "+251911234567", "password" => "[FILTERED]", "business_name" => "Test Company", "tin_number" => "123456789", "business_type" => "retailer", "date_of_birth" => "1990-01-01", "gender" => "male", "nationality" => "Ethiopian", "occupation" => "Business Owner", "source_of_funds" => "Salary", "kyc_status" => "pending"}, "address" => {"address_type" => "home", "city" => "Addis Ababa", "sub_city" => "Bole", "woreda" => "03", "latitude" => "9.0222", "longitude" => "38.7468"}}}
6414
+ TRANSACTION (0.6ms) BEGIN /*action='signup',application='Dummy',controller='auth'*/
6415
+ SnfCore::Address Create (4.5ms) INSERT INTO "snf_core_addresses" ("address_type", "city", "sub_city", "woreda", "latitude", "longitude", "created_at", "updated_at", "house_number") VALUES ('home', 'Addis Ababa', 'Bole', '03', 9.0222, 38.7468, '2025-03-12 10:40:25.387767', '2025-03-12 10:40:25.387767', NULL) RETURNING "id" /*action='signup',application='Dummy',controller='auth'*/
6416
+ SnfCore::User Exists? (2.3ms) SELECT 1 AS one FROM "snf_core_users" WHERE "snf_core_users"."phone_number" = '+251911234567' LIMIT 1 /*action='signup',application='Dummy',controller='auth'*/
6417
+ SnfCore::User Exists? (0.2ms) SELECT 1 AS one FROM "snf_core_users" WHERE "snf_core_users"."email" IS NULL LIMIT 1 /*action='signup',application='Dummy',controller='auth'*/
6418
+ TRANSACTION (0.3ms) ROLLBACK /*action='signup',application='Dummy',controller='auth'*/
6419
+ Completed 204 No Content in 295ms (ActiveRecord: 7.9ms (3 queries, 0 cached) | GC: 37.3ms)
6420
+
6421
+
6422
+ Started POST "/snf_core/auth/signup" for ::1 at 2025-03-12 13:43:05 +0300
6423
+ Processing by SnfCore::AuthController#signup as */*
6424
+ Parameters: {"user" => {"first_name" => "John", "middle_name" => "Michael", "last_name" => "Doe", "phone_number" => "+251911234567", "password" => "[FILTERED]", "business_name" => "Test Company", "tin_number" => "123456789", "business_type" => "retailer", "date_of_birth" => "1990-01-01", "gender" => "male", "nationality" => "Ethiopian", "occupation" => "Business Owner", "source_of_funds" => "Salary", "kyc_status" => "pending"}, "address" => {"address_type" => "home", "city" => "Addis Ababa", "sub_city" => "Bole", "woreda" => "03", "latitude" => "9.0222", "longitude" => "38.7468"}, "auth" => {"user" => {"first_name" => "John", "middle_name" => "Michael", "last_name" => "Doe", "phone_number" => "+251911234567", "password" => "[FILTERED]", "business_name" => "Test Company", "tin_number" => "123456789", "business_type" => "retailer", "date_of_birth" => "1990-01-01", "gender" => "male", "nationality" => "Ethiopian", "occupation" => "Business Owner", "source_of_funds" => "Salary", "kyc_status" => "pending"}, "address" => {"address_type" => "home", "city" => "Addis Ababa", "sub_city" => "Bole", "woreda" => "03", "latitude" => "9.0222", "longitude" => "38.7468"}}}
6425
+ TRANSACTION (29.8ms) BEGIN /*action='signup',application='Dummy',controller='auth'*/
6426
+ SnfCore::Address Create (12.0ms) INSERT INTO "snf_core_addresses" ("address_type", "city", "sub_city", "woreda", "latitude", "longitude", "created_at", "updated_at", "house_number") VALUES ('home', 'Addis Ababa', 'Bole', '03', 9.0222, 38.7468, '2025-03-12 10:43:06.152834', '2025-03-12 10:43:06.152834', NULL) RETURNING "id" /*action='signup',application='Dummy',controller='auth'*/
6427
+ SnfCore::User Exists? (3.8ms) SELECT 1 AS one FROM "snf_core_users" WHERE "snf_core_users"."phone_number" = '+251911234567' LIMIT 1 /*action='signup',application='Dummy',controller='auth'*/
6428
+ SnfCore::User Exists? (0.2ms) SELECT 1 AS one FROM "snf_core_users" WHERE "snf_core_users"."email" IS NULL LIMIT 1 /*action='signup',application='Dummy',controller='auth'*/
6429
+ TRANSACTION (0.3ms) ROLLBACK /*action='signup',application='Dummy',controller='auth'*/
6430
+ Completed 422 Unprocessable Content in 1387ms (Views: 0.1ms | ActiveRecord: 181.6ms (3 queries, 0 cached) | GC: 65.7ms)
6431
+
6432
+
6433
+ Started POST "/snf_core/auth/signup" for ::1 at 2025-03-12 13:46:51 +0300
6434
+ Processing by SnfCore::AuthController#signup as */*
6435
+ Parameters: {"user" => {"first_name" => "John", "middle_name" => "Michael", "last_name" => "Doe", "phone_number" => "+251911234577", "password" => "[FILTERED]", "business_name" => "Test Company", "tin_number" => "123456789", "business_type" => "retailer", "date_of_birth" => "1990-01-01", "gender" => "male", "nationality" => "Ethiopian", "occupation" => "Business Owner", "source_of_funds" => "Salary", "kyc_status" => "pending"}, "address" => {"address_type" => "home", "city" => "Addis Ababa", "sub_city" => "Bole", "woreda" => "03", "latitude" => "9.0222", "longitude" => "38.7468"}, "auth" => {"user" => {"first_name" => "John", "middle_name" => "Michael", "last_name" => "Doe", "phone_number" => "+251911234577", "password" => "[FILTERED]", "business_name" => "Test Company", "tin_number" => "123456789", "business_type" => "retailer", "date_of_birth" => "1990-01-01", "gender" => "male", "nationality" => "Ethiopian", "occupation" => "Business Owner", "source_of_funds" => "Salary", "kyc_status" => "pending"}, "address" => {"address_type" => "home", "city" => "Addis Ababa", "sub_city" => "Bole", "woreda" => "03", "latitude" => "9.0222", "longitude" => "38.7468"}}}
6436
+ TRANSACTION (8.5ms) BEGIN /*action='signup',application='Dummy',controller='auth'*/
6437
+ SnfCore::Address Create (26.4ms) INSERT INTO "snf_core_addresses" ("address_type", "city", "sub_city", "woreda", "latitude", "longitude", "created_at", "updated_at", "house_number") VALUES ('home', 'Addis Ababa', 'Bole', '03', 9.0222, 38.7468, '2025-03-12 10:46:51.572677', '2025-03-12 10:46:51.572677', NULL) RETURNING "id" /*action='signup',application='Dummy',controller='auth'*/
6438
+ SnfCore::User Exists? (3.1ms) SELECT 1 AS one FROM "snf_core_users" WHERE "snf_core_users"."phone_number" = '+251911234577' LIMIT 1 /*action='signup',application='Dummy',controller='auth'*/
6439
+ SnfCore::User Exists? (0.5ms) SELECT 1 AS one FROM "snf_core_users" WHERE "snf_core_users"."email" IS NULL LIMIT 1 /*action='signup',application='Dummy',controller='auth'*/
6440
+ TRANSACTION (0.4ms) ROLLBACK /*action='signup',application='Dummy',controller='auth'*/
6441
+ Completed 422 Unprocessable Content in 290ms (Views: 0.4ms | ActiveRecord: 39.1ms (3 queries, 0 cached) | GC: 0.0ms)
6442
+
6443
+
6444
+ Started POST "/snf_core/auth/signup" for ::1 at 2025-03-12 13:47:06 +0300
6445
+ Processing by SnfCore::AuthController#signup as */*
6446
+ Parameters: {"user" => {"first_name" => "John", "middle_name" => "Michael", "last_name" => "Doe", "phone_number" => "+251911234577", "password" => "[FILTERED]", "business_name" => "Test Company", "tin_number" => "123456789", "business_type" => "retailer", "date_of_birth" => "1990-01-01", "gender" => "male", "nationality" => "Ethiopian", "occupation" => "Business Owner", "source_of_funds" => "Salary", "kyc_status" => "pending", "email" => "[FILTERED]"}, "address" => {"address_type" => "home", "city" => "Addis Ababa", "sub_city" => "Bole", "woreda" => "03", "latitude" => "9.0222", "longitude" => "38.7468"}, "auth" => {"user" => {"first_name" => "John", "middle_name" => "Michael", "last_name" => "Doe", "phone_number" => "+251911234577", "password" => "[FILTERED]", "business_name" => "Test Company", "tin_number" => "123456789", "business_type" => "retailer", "date_of_birth" => "1990-01-01", "gender" => "male", "nationality" => "Ethiopian", "occupation" => "Business Owner", "source_of_funds" => "Salary", "kyc_status" => "pending", "email" => "[FILTERED]"}, "address" => {"address_type" => "home", "city" => "Addis Ababa", "sub_city" => "Bole", "woreda" => "03", "latitude" => "9.0222", "longitude" => "38.7468"}}}
6447
+ TRANSACTION (0.8ms) BEGIN /*action='signup',application='Dummy',controller='auth'*/
6448
+ SnfCore::Address Create (4.2ms) INSERT INTO "snf_core_addresses" ("address_type", "city", "sub_city", "woreda", "latitude", "longitude", "created_at", "updated_at", "house_number") VALUES ('home', 'Addis Ababa', 'Bole', '03', 9.0222, 38.7468, '2025-03-12 10:47:06.073215', '2025-03-12 10:47:06.073215', NULL) RETURNING "id" /*action='signup',application='Dummy',controller='auth'*/
6449
+ Unpermitted parameter: :email. Context: { controller: SnfCore::AuthController, action: signup, request: #<ActionDispatch::Request:0x00000001722391a0>, params: {"user" => {"first_name" => "John", "middle_name" => "Michael", "last_name" => "Doe", "phone_number" => "+251911234577", "password" => "[FILTERED]", "business_name" => "Test Company", "tin_number" => "123456789", "business_type" => "retailer", "date_of_birth" => "1990-01-01", "gender" => "male", "nationality" => "Ethiopian", "occupation" => "Business Owner", "source_of_funds" => "Salary", "kyc_status" => "pending", "email" => "[FILTERED]"}, "address" => {"address_type" => "home", "city" => "Addis Ababa", "sub_city" => "Bole", "woreda" => "03", "latitude" => "9.0222", "longitude" => "38.7468"}, "controller" => "snf_core/auth", "action" => "signup", "auth" => {"user" => {"first_name" => "John", "middle_name" => "Michael", "last_name" => "Doe", "phone_number" => "+251911234577", "password" => "[FILTERED]", "business_name" => "Test Company", "tin_number" => "123456789", "business_type" => "retailer", "date_of_birth" => "1990-01-01", "gender" => "male", "nationality" => "Ethiopian", "occupation" => "Business Owner", "source_of_funds" => "Salary", "kyc_status" => "pending", "email" => "[FILTERED]"}, "address" => {"address_type" => "home", "city" => "Addis Ababa", "sub_city" => "Bole", "woreda" => "03", "latitude" => "9.0222", "longitude" => "38.7468"}}} }
6450
+ SnfCore::User Exists? (0.6ms) SELECT 1 AS one FROM "snf_core_users" WHERE "snf_core_users"."phone_number" = '+251911234577' LIMIT 1 /*action='signup',application='Dummy',controller='auth'*/
6451
+ SnfCore::User Exists? (0.2ms) SELECT 1 AS one FROM "snf_core_users" WHERE "snf_core_users"."email" IS NULL LIMIT 1 /*action='signup',application='Dummy',controller='auth'*/
6452
+ TRANSACTION (0.2ms) ROLLBACK /*action='signup',application='Dummy',controller='auth'*/
6453
+ Completed 422 Unprocessable Content in 261ms (Views: 0.1ms | ActiveRecord: 5.9ms (3 queries, 0 cached) | GC: 0.0ms)
6454
+
6455
+
6456
+ SnfCore::User Load (158.6ms) SELECT "snf_core_users".* FROM "snf_core_users" /* loading for pp */ LIMIT 11 /*application='Dummy'*/
6457
+ Started POST "/snf_core/auth/signup" for ::1 at 2025-03-12 13:49:11 +0300
6458
+ Processing by SnfCore::AuthController#signup as */*
6459
+ Parameters: {"user" => {"first_name" => "John", "middle_name" => "Michael", "last_name" => "Doe", "phone_number" => "+251911234577", "password" => "[FILTERED]", "business_name" => "Test Company", "tin_number" => "123456789", "business_type" => "retailer", "date_of_birth" => "1990-01-01", "gender" => "male", "nationality" => "Ethiopian", "occupation" => "Business Owner", "source_of_funds" => "Salary", "kyc_status" => "pending", "email" => "[FILTERED]"}, "address" => {"address_type" => "home", "city" => "Addis Ababa", "sub_city" => "Bole", "woreda" => "03", "latitude" => "9.0222", "longitude" => "38.7468"}, "auth" => {"user" => {"first_name" => "John", "middle_name" => "Michael", "last_name" => "Doe", "phone_number" => "+251911234577", "password" => "[FILTERED]", "business_name" => "Test Company", "tin_number" => "123456789", "business_type" => "retailer", "date_of_birth" => "1990-01-01", "gender" => "male", "nationality" => "Ethiopian", "occupation" => "Business Owner", "source_of_funds" => "Salary", "kyc_status" => "pending", "email" => "[FILTERED]"}, "address" => {"address_type" => "home", "city" => "Addis Ababa", "sub_city" => "Bole", "woreda" => "03", "latitude" => "9.0222", "longitude" => "38.7468"}}}
6460
+ TRANSACTION (5.2ms) BEGIN /*action='signup',application='Dummy',controller='auth'*/
6461
+ SnfCore::Address Create (4.3ms) INSERT INTO "snf_core_addresses" ("address_type", "city", "sub_city", "woreda", "latitude", "longitude", "created_at", "updated_at", "house_number") VALUES ('home', 'Addis Ababa', 'Bole', '03', 9.0222, 38.7468, '2025-03-12 10:49:11.654231', '2025-03-12 10:49:11.654231', NULL) RETURNING "id" /*action='signup',application='Dummy',controller='auth'*/
6462
+ SnfCore::User Exists? (0.3ms) SELECT 1 AS one FROM "snf_core_users" WHERE "snf_core_users"."phone_number" = '+251911234577' LIMIT 1 /*action='signup',application='Dummy',controller='auth'*/
6463
+ SnfCore::User Exists? (0.3ms) SELECT 1 AS one FROM "snf_core_users" WHERE "snf_core_users"."email" = 'test@gmail.com' LIMIT 1 /*action='signup',application='Dummy',controller='auth'*/
6464
+ SnfCore::User Create (5.1ms) INSERT INTO "snf_core_users" ("first_name", "middle_name", "last_name", "email", "phone_number", "created_at", "updated_at", "password_digest", "password_changed", "reset_password_token", "date_of_birth", "nationality", "occupation", "source_of_funds", "kyc_status", "gender", "verified_at", "verified_by_id", "address_id") VALUES ('John', 'Michael', 'Doe', 'test@gmail.com', '+251911234577', '2025-03-12 10:49:11.904537', '2025-03-12 10:49:11.904537', '$2a$12$zQqe4P9C3riyFAgImdAhHOV1sRo/QqKK/vCSNw1dNLV9vFSxN4J4C', FALSE, NULL, '1990-01-01', 'Ethiopian', 'Business Owner', 'Salary', 0, 0, NULL, NULL, 9) RETURNING "id" /*action='signup',application='Dummy',controller='auth'*/
6465
+ SnfCore::Business Exists? (3.4ms) SELECT 1 AS one FROM "snf_core_businesses" WHERE "snf_core_businesses"."tin_number" = '123456789' LIMIT 1 /*action='signup',application='Dummy',controller='auth'*/
6466
+ TRANSACTION (0.4ms) ROLLBACK /*action='signup',application='Dummy',controller='auth'*/
6467
+ Completed 422 Unprocessable Content in 356ms (Views: 0.1ms | ActiveRecord: 61.1ms (5 queries, 0 cached) | GC: 20.1ms)
6468
+
6469
+
6470
+ Started POST "/snf_core/auth/signup" for ::1 at 2025-03-12 13:49:30 +0300
6471
+ Processing by SnfCore::AuthController#signup as */*
6472
+ Parameters: {"user" => {"first_name" => "John", "middle_name" => "Michael", "last_name" => "Doe", "phone_number" => "+251911234577", "password" => "[FILTERED]", "business_name" => "Test Company", "tin_number" => "1234567890", "business_type" => "retailer", "date_of_birth" => "1990-01-01", "gender" => "male", "nationality" => "Ethiopian", "occupation" => "Business Owner", "source_of_funds" => "Salary", "kyc_status" => "pending", "email" => "[FILTERED]"}, "address" => {"address_type" => "home", "city" => "Addis Ababa", "sub_city" => "Bole", "woreda" => "03", "latitude" => "9.0222", "longitude" => "38.7468"}, "auth" => {"user" => {"first_name" => "John", "middle_name" => "Michael", "last_name" => "Doe", "phone_number" => "+251911234577", "password" => "[FILTERED]", "business_name" => "Test Company", "tin_number" => "1234567890", "business_type" => "retailer", "date_of_birth" => "1990-01-01", "gender" => "male", "nationality" => "Ethiopian", "occupation" => "Business Owner", "source_of_funds" => "Salary", "kyc_status" => "pending", "email" => "[FILTERED]"}, "address" => {"address_type" => "home", "city" => "Addis Ababa", "sub_city" => "Bole", "woreda" => "03", "latitude" => "9.0222", "longitude" => "38.7468"}}}
6473
+ TRANSACTION (1.2ms) BEGIN /*action='signup',application='Dummy',controller='auth'*/
6474
+ SnfCore::Address Create (4.6ms) INSERT INTO "snf_core_addresses" ("address_type", "city", "sub_city", "woreda", "latitude", "longitude", "created_at", "updated_at", "house_number") VALUES ('home', 'Addis Ababa', 'Bole', '03', 9.0222, 38.7468, '2025-03-12 10:49:30.222638', '2025-03-12 10:49:30.222638', NULL) RETURNING "id" /*action='signup',application='Dummy',controller='auth'*/
6475
+ SnfCore::User Exists? (2.1ms) SELECT 1 AS one FROM "snf_core_users" WHERE "snf_core_users"."phone_number" = '+251911234577' LIMIT 1 /*action='signup',application='Dummy',controller='auth'*/
6476
+ SnfCore::User Exists? (0.4ms) SELECT 1 AS one FROM "snf_core_users" WHERE "snf_core_users"."email" = 'test@gmail.com' LIMIT 1 /*action='signup',application='Dummy',controller='auth'*/
6477
+ SnfCore::User Create (0.7ms) INSERT INTO "snf_core_users" ("first_name", "middle_name", "last_name", "email", "phone_number", "created_at", "updated_at", "password_digest", "password_changed", "reset_password_token", "date_of_birth", "nationality", "occupation", "source_of_funds", "kyc_status", "gender", "verified_at", "verified_by_id", "address_id") VALUES ('John', 'Michael', 'Doe', 'test@gmail.com', '+251911234577', '2025-03-12 10:49:30.479295', '2025-03-12 10:49:30.479295', '$2a$12$r0.U7S3DR/q9j1Hd/qswGOP6cS3BrR1DNPMNVOsPS5no18/vZW6NK', FALSE, NULL, '1990-01-01', 'Ethiopian', 'Business Owner', 'Salary', 0, 0, NULL, NULL, 10) RETURNING "id" /*action='signup',application='Dummy',controller='auth'*/
6478
+ SnfCore::Business Exists? (0.2ms) SELECT 1 AS one FROM "snf_core_businesses" WHERE "snf_core_businesses"."tin_number" = '1234567890' LIMIT 1 /*action='signup',application='Dummy',controller='auth'*/
6479
+ SnfCore::Business Create (1.6ms) INSERT INTO "snf_core_businesses" ("user_id", "business_name", "tin_number", "business_type", "verified_at", "verification_status", "created_at", "updated_at") VALUES (3, 'Test Company', '1234567890', 0, NULL, 0, '2025-03-12 10:49:30.482167', '2025-03-12 10:49:30.482167') RETURNING "id" /*action='signup',application='Dummy',controller='auth'*/
6480
+ TRANSACTION (2.7ms) COMMIT /*action='signup',application='Dummy',controller='auth'*/
6481
+ Completed 201 Created in 274ms (Views: 0.3ms | ActiveRecord: 13.4ms (6 queries, 0 cached) | GC: 2.6ms)
6482
+
6483
+