we_bridge_rails_engine_orgs 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/models/org.rb +2 -1
- data/lib/we_bridge_rails_engine_orgs/version.rb +1 -1
- data/spec/dummy/log/development.log +1 -0
- data/spec/dummy/log/test.log +233 -0
- data/spec/models/org_spec.rb +13 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de33d3993b5400f1602ac9a1ca7c7a6d977ac726
|
4
|
+
data.tar.gz: 390c4088ffa4ae3b0d90a0aca5127833ec70d786
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38872d11acc88826033ffce1a004f28ebd40c4b1e58e10265ae9c25fc1555ebc32296238572aa35d8b80ded9f8110353b133cbcca9f8d2d5ef3c9f1fdcb0f634
|
7
|
+
data.tar.gz: 617e2ab01197aa95e73350ae6998488bec1dd5130afcaef59259be2fdb583fc6e50d7366d138d4180c85ccee2578d2f14e961dc500dc68f5484967bbca42c29f
|
data/Gemfile.lock
CHANGED
data/app/models/org.rb
CHANGED
@@ -8,6 +8,8 @@ class Org < ActiveRecord::Base
|
|
8
8
|
has_many :member_types, class_name: "OrgMemberType"
|
9
9
|
has_many :member_tags, class_name: "OrgMemberTag"
|
10
10
|
has_many :activities, class_name: "OrgActivity"
|
11
|
+
has_many :branches, class_name: "OrgBranch"
|
12
|
+
|
11
13
|
include ActiveRecord::Mlang
|
12
14
|
include ActionView::Helpers::AutoTagHelper::FormInfo
|
13
15
|
set_accessible_attrs :lang_id, :email,:url,:domain,:started_on,:post_number,:tel
|
@@ -19,5 +21,4 @@ class Org < ActiveRecord::Base
|
|
19
21
|
tname = OrgDirectorType.table_name
|
20
22
|
self.directors.joins(:org_director_type).where("#{tname}.position" => OrgDirectorType.where(org_id: self.id).minimum(:position)).order(id: :asc).uniq.first
|
21
23
|
end
|
22
|
-
|
23
24
|
end
|
@@ -30993,3 +30993,4 @@ Migrating to CreateOrgDepartmentPositions (20151204183612)
|
|
30993
30993
|
WHERE name='index_user_texts_on_lang_id_and_parent_id' AND type='index'
|
30994
30994
|
[0m
|
30995
30995
|
[1m[36mOrgDepartment Load (0.2ms)[0m [1mSELECT "org_departments".* FROM "org_departments" ORDER BY "org_departments"."id" ASC LIMIT 1[0m
|
30996
|
+
[1m[36mOrgBranch Load (5.8ms)[0m [1mSELECT "org_branches".* FROM "org_branches" ORDER BY "org_branches"."position" ASC, "org_branches"."id" ASC[0m
|
data/spec/dummy/log/test.log
CHANGED
@@ -3421,3 +3421,236 @@ Migrating to CreateOrgDepartmentPositions (20151204183612)
|
|
3421
3421
|
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
3422
3422
|
[1m[36m (0.1ms)[0m [1mSELECT COUNT(*) FROM "org_members" WHERE "org_members"."retired_on" IS NULL AND "org_members"."org_id" = ?[0m [["org_id", 1]]
|
3423
3423
|
[1m[35m (0.7ms)[0m rollback transaction
|
3424
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.7ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
3425
|
+
[1m[35m (0.1ms)[0m begin transaction
|
3426
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
3427
|
+
[1m[35mSQL (1.3ms)[0m INSERT INTO "orgs" ("lang_id", "created_at", "updated_at") VALUES (?, ?, ?) [["lang_id", 1], ["created_at", "2015-12-08 12:17:45.568813"], ["updated_at", "2015-12-08 12:17:45.568813"]]
|
3428
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3429
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
3430
|
+
[1m[36mSQL (2.6ms)[0m [1mINSERT INTO "org_branches" ("org_id", "org_branch_type_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["org_id", 1], ["org_branch_type_id", 1], ["created_at", "2015-12-08 12:17:45.592907"], ["updated_at", "2015-12-08 12:17:45.592907"]]
|
3431
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
3432
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
3433
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "org_branches" ("org_id", "org_branch_type_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["org_id", 1], ["org_branch_type_id", 1], ["created_at", "2015-12-08 12:17:45.598024"], ["updated_at", "2015-12-08 12:17:45.598024"]]
|
3434
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3435
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
3436
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "org_members" ("org_id", "entried_on", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["org_id", 1], ["entried_on", "2015-12-08"], ["created_at", "2015-12-08 12:17:45.633291"], ["updated_at", "2015-12-08 12:17:45.633291"]]
|
3437
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
3438
|
+
[1m[36mOrgBranchMemberMapping Load (0.6ms)[0m [1mSELECT "org_branch_member_mappings".* FROM "org_branch_member_mappings" WHERE "org_branch_member_mappings"."org_member_id" = ? AND "org_branch_member_mappings"."org_branch_id" = ? LIMIT 1[0m [["org_member_id", 1], ["org_branch_id", 1]]
|
3439
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
3440
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "org_branch_member_mappings" ("org_member_id", "org_branch_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["org_member_id", 1], ["org_branch_id", 1], ["created_at", "2015-12-08 12:17:45.649232"], ["updated_at", "2015-12-08 12:17:45.649232"]]
|
3441
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
3442
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM "org_branches" WHERE "org_branches"."org_id" = ?[0m [["org_id", 1]]
|
3443
|
+
[1m[35m (0.9ms)[0m rollback transaction
|
3444
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
3445
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
3446
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "orgs" ("lang_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["lang_id", 1], ["created_at", "2015-12-08 12:17:45.727671"], ["updated_at", "2015-12-08 12:17:45.727671"]]
|
3447
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
3448
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
3449
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "org_members" ("org_id", "entried_on", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["org_id", 1], ["entried_on", "2015-12-08"], ["created_at", "2015-12-08 12:17:45.730827"], ["updated_at", "2015-12-08 12:17:45.730827"]]
|
3450
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3451
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
3452
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "org_members" ("org_id", "entried_on", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["org_id", 1], ["entried_on", "2015-12-08"], ["created_at", "2015-12-08 12:17:45.733400"], ["updated_at", "2015-12-08 12:17:45.733400"]]
|
3453
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
3454
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
3455
|
+
[1m[35mSQL (0.8ms)[0m INSERT INTO "org_director_types" ("org_id", "created_at", "updated_at") VALUES (?, ?, ?) [["org_id", 1], ["created_at", "2015-12-08 12:17:45.745646"], ["updated_at", "2015-12-08 12:17:45.745646"]]
|
3456
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3457
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
3458
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "org_director_types" ("org_id", "position", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["org_id", 1], ["position", 1], ["created_at", "2015-12-08 12:17:45.748753"], ["updated_at", "2015-12-08 12:17:45.748753"]]
|
3459
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
3460
|
+
[1m[36m (0.2ms)[0m [1mSELECT MIN("org_director_types"."position") FROM "org_director_types" WHERE "org_director_types"."org_id" = ?[0m [["org_id", 1]]
|
3461
|
+
[1m[35mOrgMember Load (0.3ms)[0m SELECT DISTINCT "org_members".* FROM "org_members" INNER JOIN "org_director_types" "org_director_types_org_members" ON "org_director_types_org_members"."id" = "org_members"."org_director_type_id" INNER JOIN "org_director_types" ON "org_members"."org_director_type_id" = "org_director_types"."id" WHERE "org_members"."retired_on" IS NULL AND "org_director_types"."org_id" = ? AND "org_director_types"."position" = 0 ORDER BY "org_members"."id" ASC LIMIT 1 [["org_id", 1]]
|
3462
|
+
[1m[36m (0.8ms)[0m [1mrollback transaction[0m
|
3463
|
+
[1m[35m (0.1ms)[0m begin transaction
|
3464
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
3465
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orgs" ("lang_id", "created_at", "updated_at") VALUES (?, ?, ?) [["lang_id", 1], ["created_at", "2015-12-08 12:17:45.781563"], ["updated_at", "2015-12-08 12:17:45.781563"]]
|
3466
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3467
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
3468
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "org_members" ("org_id", "entried_on", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["org_id", 1], ["entried_on", "2015-12-08"], ["created_at", "2015-12-08 12:17:45.784374"], ["updated_at", "2015-12-08 12:17:45.784374"]]
|
3469
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
3470
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
3471
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "org_members" ("org_id", "entried_on", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["org_id", 1], ["entried_on", "2015-12-08"], ["created_at", "2015-12-08 12:17:45.786414"], ["updated_at", "2015-12-08 12:17:45.786414"]]
|
3472
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3473
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
3474
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "org_director_types" ("org_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["org_id", 1], ["created_at", "2015-12-08 12:17:45.788706"], ["updated_at", "2015-12-08 12:17:45.788706"]]
|
3475
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
3476
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
3477
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "org_director_types" ("org_id", "position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["org_id", 1], ["position", 1], ["created_at", "2015-12-08 12:17:45.790672"], ["updated_at", "2015-12-08 12:17:45.790672"]]
|
3478
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3479
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
3480
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "org_members" SET "org_director_type_id" = ?, "updated_at" = ? WHERE "org_members"."id" = ?[0m [["org_director_type_id", 2], ["updated_at", "2015-12-08 12:17:45.792208"], ["id", 1]]
|
3481
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
3482
|
+
[1m[36m (0.1ms)[0m [1mSELECT MIN("org_director_types"."position") FROM "org_director_types" WHERE "org_director_types"."org_id" = ?[0m [["org_id", 1]]
|
3483
|
+
[1m[35mOrgMember Load (0.1ms)[0m SELECT DISTINCT "org_members".* FROM "org_members" INNER JOIN "org_director_types" "org_director_types_org_members" ON "org_director_types_org_members"."id" = "org_members"."org_director_type_id" INNER JOIN "org_director_types" ON "org_members"."org_director_type_id" = "org_director_types"."id" WHERE "org_members"."retired_on" IS NULL AND "org_director_types"."org_id" = ? AND "org_director_types"."position" = 0 ORDER BY "org_members"."id" ASC LIMIT 1 [["org_id", 1]]
|
3484
|
+
[1m[36m (0.9ms)[0m [1mrollback transaction[0m
|
3485
|
+
[1m[35m (0.1ms)[0m begin transaction
|
3486
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
3487
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "orgs" ("lang_id", "created_at", "updated_at") VALUES (?, ?, ?) [["lang_id", 1], ["created_at", "2015-12-08 12:17:45.801318"], ["updated_at", "2015-12-08 12:17:45.801318"]]
|
3488
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3489
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
3490
|
+
[1m[36mSQL (0.5ms)[0m [1mINSERT INTO "org_members" ("org_id", "entried_on", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["org_id", 1], ["entried_on", "2015-12-08"], ["created_at", "2015-12-08 12:17:45.805198"], ["updated_at", "2015-12-08 12:17:45.805198"]]
|
3491
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
3492
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
3493
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "org_members" ("org_id", "entried_on", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["org_id", 1], ["entried_on", "2015-12-08"], ["created_at", "2015-12-08 12:17:45.808270"], ["updated_at", "2015-12-08 12:17:45.808270"]]
|
3494
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3495
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
3496
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "org_director_types" ("org_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["org_id", 1], ["created_at", "2015-12-08 12:17:45.810574"], ["updated_at", "2015-12-08 12:17:45.810574"]]
|
3497
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
3498
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
3499
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "org_director_types" ("org_id", "position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["org_id", 1], ["position", 1], ["created_at", "2015-12-08 12:17:45.812584"], ["updated_at", "2015-12-08 12:17:45.812584"]]
|
3500
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3501
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
3502
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "org_members" SET "org_director_type_id" = ?, "updated_at" = ? WHERE "org_members"."id" = ?[0m [["org_director_type_id", 1], ["updated_at", "2015-12-08 12:17:45.814378"], ["id", 2]]
|
3503
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
3504
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
3505
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "org_members" SET "org_director_type_id" = ?, "updated_at" = ? WHERE "org_members"."id" = ? [["org_director_type_id", 2], ["updated_at", "2015-12-08 12:17:45.816282"], ["id", 1]]
|
3506
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3507
|
+
[1m[35m (0.1ms)[0m SELECT MIN("org_director_types"."position") FROM "org_director_types" WHERE "org_director_types"."org_id" = ? [["org_id", 1]]
|
3508
|
+
[1m[36mOrgMember Load (0.1ms)[0m [1mSELECT DISTINCT "org_members".* FROM "org_members" INNER JOIN "org_director_types" "org_director_types_org_members" ON "org_director_types_org_members"."id" = "org_members"."org_director_type_id" INNER JOIN "org_director_types" ON "org_members"."org_director_type_id" = "org_director_types"."id" WHERE "org_members"."retired_on" IS NULL AND "org_director_types"."org_id" = ? AND "org_director_types"."position" = 0 ORDER BY "org_members"."id" ASC LIMIT 1[0m [["org_id", 1]]
|
3509
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
3510
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
3511
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
3512
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "orgs" ("lang_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["lang_id", 1], ["created_at", "2015-12-08 12:17:45.824544"], ["updated_at", "2015-12-08 12:17:45.824544"]]
|
3513
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
3514
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
3515
|
+
[1m[35mSQL (0.7ms)[0m INSERT INTO "org_members" ("org_id", "entried_on", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["org_id", 1], ["entried_on", "2015-12-08"], ["created_at", "2015-12-08 12:17:45.827750"], ["updated_at", "2015-12-08 12:17:45.827750"]]
|
3516
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3517
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
3518
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "org_members" ("org_id", "entried_on", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["org_id", 1], ["entried_on", "2015-12-08"], ["created_at", "2015-12-08 12:17:45.831747"], ["updated_at", "2015-12-08 12:17:45.831747"]]
|
3519
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
3520
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
3521
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "org_director_types" ("org_id", "created_at", "updated_at") VALUES (?, ?, ?) [["org_id", 1], ["created_at", "2015-12-08 12:17:45.835035"], ["updated_at", "2015-12-08 12:17:45.835035"]]
|
3522
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3523
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
3524
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "org_director_types" ("org_id", "position", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["org_id", 1], ["position", 1], ["created_at", "2015-12-08 12:17:45.836724"], ["updated_at", "2015-12-08 12:17:45.836724"]]
|
3525
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
3526
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
3527
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "org_members" SET "org_director_type_id" = ?, "updated_at" = ? WHERE "org_members"."id" = ? [["org_director_type_id", 1], ["updated_at", "2015-12-08 12:17:45.838792"], ["id", 2]]
|
3528
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3529
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
3530
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "org_members" SET "org_director_type_id" = ?, "updated_at" = ? WHERE "org_members"."id" = ?[0m [["org_director_type_id", 2], ["updated_at", "2015-12-08 12:17:45.840654"], ["id", 1]]
|
3531
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
3532
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
3533
|
+
[1m[35mOrgDirectorType Load (0.1ms)[0m SELECT "org_director_types"."limit" FROM "org_director_types" WHERE "org_director_types"."id" = ? ORDER BY "org_director_types"."id" ASC LIMIT 1 [["id", 1]]
|
3534
|
+
[1m[36mSQL (0.1ms)[0m [1mUPDATE "org_members" SET "org_director_type_id" = ?, "updated_at" = ? WHERE "org_members"."id" = ?[0m [["org_director_type_id", 1], ["updated_at", "2015-12-08 12:17:45.843434"], ["id", 1]]
|
3535
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
3536
|
+
[1m[36m (0.1ms)[0m [1mSELECT MIN("org_director_types"."position") FROM "org_director_types" WHERE "org_director_types"."org_id" = ?[0m [["org_id", 1]]
|
3537
|
+
[1m[35mOrgMember Load (0.1ms)[0m SELECT DISTINCT "org_members".* FROM "org_members" INNER JOIN "org_director_types" "org_director_types_org_members" ON "org_director_types_org_members"."id" = "org_members"."org_director_type_id" INNER JOIN "org_director_types" ON "org_members"."org_director_type_id" = "org_director_types"."id" WHERE "org_members"."retired_on" IS NULL AND "org_director_types"."org_id" = ? AND "org_director_types"."position" = 0 ORDER BY "org_members"."id" ASC LIMIT 1 [["org_id", 1]]
|
3538
|
+
[1m[36m (1.0ms)[0m [1mrollback transaction[0m
|
3539
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
3540
|
+
[1m[35m (0.1ms)[0m begin transaction
|
3541
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
3542
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "orgs" ("lang_id", "created_at", "updated_at") VALUES (?, ?, ?) [["lang_id", 1], ["created_at", "2015-12-08 12:18:32.029652"], ["updated_at", "2015-12-08 12:18:32.029652"]]
|
3543
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3544
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
3545
|
+
[1m[36mSQL (1.1ms)[0m [1mINSERT INTO "org_branches" ("org_id", "org_branch_type_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["org_id", 2], ["org_branch_type_id", 1], ["created_at", "2015-12-08 12:18:32.044763"], ["updated_at", "2015-12-08 12:18:32.044763"]]
|
3546
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
3547
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
3548
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "org_branches" ("org_id", "org_branch_type_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["org_id", 1], ["org_branch_type_id", 1], ["created_at", "2015-12-08 12:18:32.048004"], ["updated_at", "2015-12-08 12:18:32.048004"]]
|
3549
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3550
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
3551
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "org_branches" ("org_id", "org_branch_type_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["org_id", 1], ["org_branch_type_id", 1], ["created_at", "2015-12-08 12:18:32.049650"], ["updated_at", "2015-12-08 12:18:32.049650"]]
|
3552
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
3553
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
3554
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "org_members" ("org_id", "entried_on", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["org_id", 1], ["entried_on", "2015-12-08"], ["created_at", "2015-12-08 12:18:32.080543"], ["updated_at", "2015-12-08 12:18:32.080543"]]
|
3555
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3556
|
+
[1m[35mOrgBranchMemberMapping Load (0.1ms)[0m SELECT "org_branch_member_mappings".* FROM "org_branch_member_mappings" WHERE "org_branch_member_mappings"."org_member_id" = ? AND "org_branch_member_mappings"."org_branch_id" = ? LIMIT 1 [["org_member_id", 1], ["org_branch_id", 2]]
|
3557
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
3558
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "org_branch_member_mappings" ("org_member_id", "org_branch_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["org_member_id", 1], ["org_branch_id", 2], ["created_at", "2015-12-08 12:18:32.090148"], ["updated_at", "2015-12-08 12:18:32.090148"]]
|
3559
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3560
|
+
[1m[35m (0.1ms)[0m SELECT COUNT(*) FROM "org_branches" WHERE "org_branches"."org_id" = ? [["org_id", 1]]
|
3561
|
+
[1m[36m (8.9ms)[0m [1mrollback transaction[0m
|
3562
|
+
[1m[35m (0.1ms)[0m begin transaction
|
3563
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
3564
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "orgs" ("lang_id", "created_at", "updated_at") VALUES (?, ?, ?) [["lang_id", 1], ["created_at", "2015-12-08 12:18:32.161507"], ["updated_at", "2015-12-08 12:18:32.161507"]]
|
3565
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3566
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
3567
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO "org_members" ("org_id", "entried_on", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["org_id", 1], ["entried_on", "2015-12-08"], ["created_at", "2015-12-08 12:18:32.165865"], ["updated_at", "2015-12-08 12:18:32.165865"]]
|
3568
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
3569
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
3570
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "org_members" ("org_id", "entried_on", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["org_id", 1], ["entried_on", "2015-12-08"], ["created_at", "2015-12-08 12:18:32.168358"], ["updated_at", "2015-12-08 12:18:32.168358"]]
|
3571
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3572
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
3573
|
+
[1m[36mSQL (0.2ms)[0m [1mINSERT INTO "org_director_types" ("org_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["org_id", 1], ["created_at", "2015-12-08 12:18:32.180962"], ["updated_at", "2015-12-08 12:18:32.180962"]]
|
3574
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
3575
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
3576
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "org_director_types" ("org_id", "position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["org_id", 1], ["position", 1], ["created_at", "2015-12-08 12:18:32.182565"], ["updated_at", "2015-12-08 12:18:32.182565"]]
|
3577
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3578
|
+
[1m[35m (0.2ms)[0m SELECT MIN("org_director_types"."position") FROM "org_director_types" WHERE "org_director_types"."org_id" = ? [["org_id", 1]]
|
3579
|
+
[1m[36mOrgMember Load (0.3ms)[0m [1mSELECT DISTINCT "org_members".* FROM "org_members" INNER JOIN "org_director_types" "org_director_types_org_members" ON "org_director_types_org_members"."id" = "org_members"."org_director_type_id" INNER JOIN "org_director_types" ON "org_members"."org_director_type_id" = "org_director_types"."id" WHERE "org_members"."retired_on" IS NULL AND "org_director_types"."org_id" = ? AND "org_director_types"."position" = 0 ORDER BY "org_members"."id" ASC LIMIT 1[0m [["org_id", 1]]
|
3580
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
3581
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
3582
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
3583
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "orgs" ("lang_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["lang_id", 1], ["created_at", "2015-12-08 12:18:32.203398"], ["updated_at", "2015-12-08 12:18:32.203398"]]
|
3584
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
3585
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
3586
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "org_members" ("org_id", "entried_on", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["org_id", 1], ["entried_on", "2015-12-08"], ["created_at", "2015-12-08 12:18:32.207546"], ["updated_at", "2015-12-08 12:18:32.207546"]]
|
3587
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3588
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
3589
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "org_members" ("org_id", "entried_on", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["org_id", 1], ["entried_on", "2015-12-08"], ["created_at", "2015-12-08 12:18:32.209558"], ["updated_at", "2015-12-08 12:18:32.209558"]]
|
3590
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
3591
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
3592
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "org_director_types" ("org_id", "created_at", "updated_at") VALUES (?, ?, ?) [["org_id", 1], ["created_at", "2015-12-08 12:18:32.210982"], ["updated_at", "2015-12-08 12:18:32.210982"]]
|
3593
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3594
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
3595
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "org_director_types" ("org_id", "position", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["org_id", 1], ["position", 1], ["created_at", "2015-12-08 12:18:32.212639"], ["updated_at", "2015-12-08 12:18:32.212639"]]
|
3596
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
3597
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
3598
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "org_members" SET "org_director_type_id" = ?, "updated_at" = ? WHERE "org_members"."id" = ? [["org_director_type_id", 2], ["updated_at", "2015-12-08 12:18:32.214250"], ["id", 1]]
|
3599
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3600
|
+
[1m[35m (0.0ms)[0m SELECT MIN("org_director_types"."position") FROM "org_director_types" WHERE "org_director_types"."org_id" = ? [["org_id", 1]]
|
3601
|
+
[1m[36mOrgMember Load (0.0ms)[0m [1mSELECT DISTINCT "org_members".* FROM "org_members" INNER JOIN "org_director_types" "org_director_types_org_members" ON "org_director_types_org_members"."id" = "org_members"."org_director_type_id" INNER JOIN "org_director_types" ON "org_members"."org_director_type_id" = "org_director_types"."id" WHERE "org_members"."retired_on" IS NULL AND "org_director_types"."org_id" = ? AND "org_director_types"."position" = 0 ORDER BY "org_members"."id" ASC LIMIT 1[0m [["org_id", 1]]
|
3602
|
+
[1m[35m (0.8ms)[0m rollback transaction
|
3603
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
3604
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
3605
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "orgs" ("lang_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["lang_id", 1], ["created_at", "2015-12-08 12:18:32.221735"], ["updated_at", "2015-12-08 12:18:32.221735"]]
|
3606
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
3607
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
3608
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "org_members" ("org_id", "entried_on", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["org_id", 1], ["entried_on", "2015-12-08"], ["created_at", "2015-12-08 12:18:32.224502"], ["updated_at", "2015-12-08 12:18:32.224502"]]
|
3609
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3610
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
3611
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "org_members" ("org_id", "entried_on", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["org_id", 1], ["entried_on", "2015-12-08"], ["created_at", "2015-12-08 12:18:32.226760"], ["updated_at", "2015-12-08 12:18:32.226760"]]
|
3612
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
3613
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
3614
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "org_director_types" ("org_id", "created_at", "updated_at") VALUES (?, ?, ?) [["org_id", 1], ["created_at", "2015-12-08 12:18:32.228496"], ["updated_at", "2015-12-08 12:18:32.228496"]]
|
3615
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3616
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
3617
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "org_director_types" ("org_id", "position", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["org_id", 1], ["position", 1], ["created_at", "2015-12-08 12:18:32.230108"], ["updated_at", "2015-12-08 12:18:32.230108"]]
|
3618
|
+
[1m[35m (0.1ms)[0m RELEASE SAVEPOINT active_record_1
|
3619
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
3620
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "org_members" SET "org_director_type_id" = ?, "updated_at" = ? WHERE "org_members"."id" = ? [["org_director_type_id", 1], ["updated_at", "2015-12-08 12:18:32.231904"], ["id", 2]]
|
3621
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3622
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
3623
|
+
[1m[36mSQL (0.0ms)[0m [1mUPDATE "org_members" SET "org_director_type_id" = ?, "updated_at" = ? WHERE "org_members"."id" = ?[0m [["org_director_type_id", 2], ["updated_at", "2015-12-08 12:18:32.233520"], ["id", 1]]
|
3624
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
3625
|
+
[1m[36m (0.0ms)[0m [1mSELECT MIN("org_director_types"."position") FROM "org_director_types" WHERE "org_director_types"."org_id" = ?[0m [["org_id", 1]]
|
3626
|
+
[1m[35mOrgMember Load (0.0ms)[0m SELECT DISTINCT "org_members".* FROM "org_members" INNER JOIN "org_director_types" "org_director_types_org_members" ON "org_director_types_org_members"."id" = "org_members"."org_director_type_id" INNER JOIN "org_director_types" ON "org_members"."org_director_type_id" = "org_director_types"."id" WHERE "org_members"."retired_on" IS NULL AND "org_director_types"."org_id" = ? AND "org_director_types"."position" = 0 ORDER BY "org_members"."id" ASC LIMIT 1 [["org_id", 1]]
|
3627
|
+
[1m[36m (0.7ms)[0m [1mrollback transaction[0m
|
3628
|
+
[1m[35m (0.1ms)[0m begin transaction
|
3629
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
3630
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "orgs" ("lang_id", "created_at", "updated_at") VALUES (?, ?, ?) [["lang_id", 1], ["created_at", "2015-12-08 12:18:32.238779"], ["updated_at", "2015-12-08 12:18:32.238779"]]
|
3631
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3632
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
3633
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO "org_members" ("org_id", "entried_on", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["org_id", 1], ["entried_on", "2015-12-08"], ["created_at", "2015-12-08 12:18:32.241041"], ["updated_at", "2015-12-08 12:18:32.241041"]]
|
3634
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
3635
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
3636
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "org_members" ("org_id", "entried_on", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["org_id", 1], ["entried_on", "2015-12-08"], ["created_at", "2015-12-08 12:18:32.242756"], ["updated_at", "2015-12-08 12:18:32.242756"]]
|
3637
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3638
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
3639
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "org_director_types" ("org_id", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["org_id", 1], ["created_at", "2015-12-08 12:18:32.244054"], ["updated_at", "2015-12-08 12:18:32.244054"]]
|
3640
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
3641
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
3642
|
+
[1m[35mSQL (0.0ms)[0m INSERT INTO "org_director_types" ("org_id", "position", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["org_id", 1], ["position", 1], ["created_at", "2015-12-08 12:18:32.245098"], ["updated_at", "2015-12-08 12:18:32.245098"]]
|
3643
|
+
[1m[36m (0.0ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3644
|
+
[1m[35m (0.0ms)[0m SAVEPOINT active_record_1
|
3645
|
+
[1m[36mSQL (0.0ms)[0m [1mUPDATE "org_members" SET "org_director_type_id" = ?, "updated_at" = ? WHERE "org_members"."id" = ?[0m [["org_director_type_id", 1], ["updated_at", "2015-12-08 12:18:32.246184"], ["id", 2]]
|
3646
|
+
[1m[35m (0.0ms)[0m RELEASE SAVEPOINT active_record_1
|
3647
|
+
[1m[36m (0.0ms)[0m [1mSAVEPOINT active_record_1[0m
|
3648
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "org_members" SET "org_director_type_id" = ?, "updated_at" = ? WHERE "org_members"."id" = ? [["org_director_type_id", 2], ["updated_at", "2015-12-08 12:18:32.247378"], ["id", 1]]
|
3649
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3650
|
+
[1m[35m (0.1ms)[0m SAVEPOINT active_record_1
|
3651
|
+
[1m[36mOrgDirectorType Load (0.1ms)[0m [1mSELECT "org_director_types"."limit" FROM "org_director_types" WHERE "org_director_types"."id" = ? ORDER BY "org_director_types"."id" ASC LIMIT 1[0m [["id", 1]]
|
3652
|
+
[1m[35mSQL (0.1ms)[0m UPDATE "org_members" SET "org_director_type_id" = ?, "updated_at" = ? WHERE "org_members"."id" = ? [["org_director_type_id", 1], ["updated_at", "2015-12-08 12:18:32.251253"], ["id", 1]]
|
3653
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
3654
|
+
[1m[35m (0.1ms)[0m SELECT MIN("org_director_types"."position") FROM "org_director_types" WHERE "org_director_types"."org_id" = ? [["org_id", 1]]
|
3655
|
+
[1m[36mOrgMember Load (0.1ms)[0m [1mSELECT DISTINCT "org_members".* FROM "org_members" INNER JOIN "org_director_types" "org_director_types_org_members" ON "org_director_types_org_members"."id" = "org_members"."org_director_type_id" INNER JOIN "org_director_types" ON "org_members"."org_director_type_id" = "org_director_types"."id" WHERE "org_members"."retired_on" IS NULL AND "org_director_types"."org_id" = ? AND "org_director_types"."position" = 0 ORDER BY "org_members"."id" ASC LIMIT 1[0m [["org_id", 1]]
|
3656
|
+
[1m[35m (0.6ms)[0m rollback transaction
|
data/spec/models/org_spec.rb
CHANGED
@@ -5,6 +5,19 @@ RSpec.describe Org, type: :model do
|
|
5
5
|
@org = Org.create!(lang_id: 1)
|
6
6
|
end
|
7
7
|
|
8
|
+
describe ".branches" do
|
9
|
+
before do
|
10
|
+
@branch_other = OrgBranch.create!(org_id: @org.id + 1, org_branch_type_id: 1)
|
11
|
+
@branch = OrgBranch.create!(org_id: @org.id, org_branch_type_id: 1)
|
12
|
+
@branch2 = OrgBranch.create!(org_id: @org.id, org_branch_type_id: 1)
|
13
|
+
@branch.add OrgMember.create!(org_id: @org.id, entried_on: Time.now)
|
14
|
+
end
|
15
|
+
|
16
|
+
it "includes no member branches" do
|
17
|
+
expect(@org.branches.count).to eq(2)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
8
21
|
describe ".representative" do
|
9
22
|
before do
|
10
23
|
@member1 = OrgMember.create!(org_id: @org.id, entried_on: Time.now)
|